The smart vehicles are one of critical enablers for automated services in smart cities to provide intelligent transportation means without human intervention. In order to fulfil requirements, Vehicle-to-Anything(V2X) communications aims to manage massive connectivity and high traffic load on base stations and extend the range over multiple hops in 5G networks. However, V2X networking faces several challenges from dynamic topology caused by high velocity of nodes and routing overhead that degrades the network performance and increases energy consumption. The existing routing scheme for V2X networking lacks energy efficiency and scalability for high velocity nodes with dense distribution. In order to handle the challenges, this article proposes a scalable and energy-efficient routing scheme called Dynamic proactive reactive routing for 5G (DPR5) for high mobility speed and dense environment. As compared to existing schemes it uses a single routing table and efficiently minimizes the energy consumption in dense environment, improves node 's lifetime upto 42%, and optimizes network performance by reducing the packet loss ratio upto 46% in a high velocity dense environment.