Recent autonomous intelligent transportation systems commonly adopt vehicular communication. Efficient communication between autonomous vehicles-to-everything (AV2X) is mandatory to ensure road safety by decreasing traffic jamming, approaching emergency vehicle warning, and assisting in low visibility traffic. In this paper, a new adaptive AV2X model, based on a novel optimization method to enhance the connectivity of the vehicular networks, is proposed. The presented model optimizes the inter-vehicle position to communicate with the autonomous vehicle (AV) or to relay information to everything. Based on the system quality-of-service (QoS) being achieved, a decision will be taken whether the transmitting AV communicates directly to the destination or through cooperative communication. To achieve the given objectives, the best position of the relay-vehicle issue was mathematically formulated as a constrained optimization problem to enhance the communication between AV2X under different environmental conditions. To illustrate the effectiveness of the proposed model, the following factors are considered: distribution of vehicles, vehicle density, vehicle mobility and speed. Simulation results show how the proposed model outperforms other previous models and enhances system performance in terms of four benchmark aspects: throughput (S), packet loss rate (PLR), packet delivery ratio (PDR) and average delivery latency (DL).