Solution to the bird and trains problem

Answer to the math problem from Posner (1973, Cognition: An introduction)

The problem:

How not to represent the problem:

A less obvious, but more productive way to represent the problem: