The rules for an intersection of roads of equal priority decide the answer: there are no priority signs or traffic lights here. At such an intersection the tram has the right of way over vehicles no matter where they are coming from, so the tram goes first even though the yellow car is approaching it from the right. Between themselves, the cars follow the rule to give way to traffic on the right. The green car is coming toward the tram, and for the yellow car it is approaching from the right, so yellow gives way to green. Green has no one to give way to, and its path doesn't cross the tram's, so it goes at the same time as the tram, and yellow goes after them