We investigate the performance of a dual-hop intervehicular communications (IVC) system with relay selection strategy. We assume a generalized fading channel model, known as cascaded Rayleigh (also called n*Rayleigh), which involves the product of n independent Rayleigh random variables. This channel model provides a realistic description of IVC, in contrast to the conventional Rayleigh fading assumption, which is more suitable for cellular networks. Unlike existing works, which mainly consider double-Rayleigh fading channels (i.e, n = 2); our system model considers the general cascading order n, for which we derive an approximate analytic solution for the outage probability under the considered scenario. Also, in this study we propose a machine learning-based power allocation scheme to improve the link reliability in IVC. The analytical and simulation results show that both selective decode-and-forward (S-DF) and amplify-and-forward (S-AF) relaying schemes have the same diversity order in the high signal-to-noise ratio regime. In addition, our results indicate that machine learning algorithms can play a central role in selecting the best relay and allocation of transmission power.