Question 380439
We see that 30 meters, d meters, and 50 meters form the sides of a right triangle (d is the distance from the train to the crossing) and 50 meters is the hypotenuse.

If you already know the 3-4-5 triple you can easily conclude that d = 40 meters. Otherwise we can set up the equation using the Pythagorean theorem:

{{{30^2 + d^2 = 50^2}}}

{{{d^2 = 1600}}}

{{{d = 40}}}