The key point is that the intersection is uncontrolled and has no priority signs, so the roads are of equal priority. At such an intersection a tram has the right-of-way over other vehicles, no matter which side it comes from or which way it's going. The rule to give way to traffic on your right applies here only among vehicles other than trams and among the trams themselves; it doesn't release a vehicle from having to give way to a tram. So before you cross the tracks, you give way both to tram A on the left and to tram B on the right