The answer depends on a tram’s priority at a controlled intersection. If the traffic light lets a tram and ordinary vehicles go at the same time, the tram has priority no matter where you are going or where it is going
You have a green light and are turning right, and in doing so you cross tram tracks: the tracks running to the right of your lane, where tram A is moving, and the tracks on the road you are turning onto, where tram B is approaching the intersection. Both trams are on tracks your path crosses, so you wait for them to pass and turn after them