You can
put this solution on YOUR website!Best thing to do here is to draw a picture so that you understand exactly what is going on in the problem.
Car is 30 meters from crossing, so is train, but they are headed perpendicularly. The picture should make a triangle. Redraw the triangle just points instead of pictures to make it easier to see.
Car to crossing = 30 meters, car to train = 50 meters, train to crossing = X meters
The sides of the triangle are 30, X, and 50 meters (with 50 being the hypotenus). Solve using the pythagorean theorum (A^2+B^2=C^2).
30^2+B^2=50^2
900+B^2=2500
B^2=1600
B=40
The 3-4-5 triangle is one of the ones you will need to memorize along with the 6-8-10 (notice that is just a 3-4-5 times 2). This will come back many times in triangle problems.