## Train Tunnel Soln

There are 4 unknowns here: X (the length of the Tunnel), Y (the distance between the train and the tunnel), M (the speed of the man) and T (the speed of the train).
The ultimate goal here is to eliminate x and y and leave a relationship between m and t.
We have these two conditions given to us:

The time it takes the man to move 1/4 of x is equal to the time it takes the train to go all of y which gives us:

x/(4m) = y/t

also, the time it takes the man to go 3/4 x is equal to the time it takes the train to go all of y and x or:

3x/(4m) = (y+x)/t

For simplicity lets call the time it takes for the man to run through all of x, z or:

z = x/m

so

z/4 = y/t

and

3z/4 = (x+y)/t

now we can solve for z in terms of y and t:

z = 4y/t

make another substitution and we will eliminate t (don’t worry it will be back):

(4y/t)*3/4 = (x+y)/t

3y/t=(x+y)/t

3y = x+y

x = 2y

(right here you know that the tunnel is twice the length of the distance between the train and tunnel, which is enough to solve it, but let’s finish the elegant, mathematical way)

now with x in terms of y we can eliminate them both from our initial equation:
x/(4m) = y/t

becomes

2y/4m = y/t

y/2m = y/t

(cross multiply)

t = 2m

or the speed of the train is twice the speed of the man.