Traditional mobile augmented reality (MAR) has limited processing and graphics rendering capabilities, leading to issues such as stuttering, latency, or crashes during runtime, affecting the user experience. By integrating virtual reality (VR) and 5G networks, users can obtain higher quality images, smoother interactions, and lower latency when using mobile devices, further enhancing user perception and optimizing user experience. The dynamic routing algorithm based on Multi-Armed Bandit (MAB) was used to generate network routing strategies, and global network resource routing was controlled and managed for reasonable routing selection and resource allocation, reducing network transmission latency. The average latency of MAR downloading videos of different sizes under 5G was 41.1% lower than that under 4G. The integration of VR and 5G network for MAR experience optimization is of great significance for improving user experience, expanding application scenarios, and reducing network transmission latency.