This article tackles a pervasive problem in connected transportation networks: the issue of conflicting right-of-way between trams and Connected Vehicles (CV) at intersections. Trams are typically granted a semi-exclusive right-of-way, leading to a clash with CV. To resolve this challenge, the study introduces a Transit Signal Priority (TSP) system and a guidance framework that seeks to minimize unintended delays for trams while minimizing the negative impact on CV, passenger comfort, energy consumption, and overall travel time. The proposed framework employs a collaborative optimization system and an improved genetic algorithm to adjust both the signal phase duration and the operating path. The study is based on data collected from a simulated intersection that includes the signal phase sequence and duration. The findings demonstrate that the proposed framework was able to reduce the transit time for trams by 45.8% and the overall transit time for trams 481 and CVs by 17.1% compared to the conventional method. Additionally, the system was able to reduce energy consumption by 34.7% and the non-comfort index by 25.8%. Overall, this research contributes to the development of a more efficient and sustainable transportation system for the future.