This is a nice question.

Draw the figure on paper.

It is a horizontal line segment ABCD. The train is at point A; the start or near end of the bridge is at point B; the man is at point C; and the end or far end of the bridge is at point D. We don't know the lengths of AB (distance of train from the near end of the bridge) and BD (the bridge), so let AB = X miles and BD = L miles long.

BC is 2/5 of L, or 2L/5 miles, and so CD is 3/5 of L, or 3L/5 miles.

The man has two choices: proceed and run for the far end, or go back and run for the near end. In both choices, he and the train would reach the same end at the same time. [Meaning, the hapless man would die at any of the two ends! So why run? Why wouldn't he just stay where he is, sing a song, and die there. :-)]

Choice #1. He goes back to the near end.

Time spent = t1 hours

distance = rate * time

train, x = 60*t1 ---(1)

man, 2L/5 = v*t1 ---(2), where v = average speed of man's running.

Choice #2. He goes ahead and run for the far end.

Time spent = t2 hours

distance = rate * time

train, x+L = 60*t2 ----(3)

man, 3L/5 = v*t2 -----(4)

That is it. Only 4 independent equations but there are 5 unknowns ---v, x, L, t1, and t2.

Interesting. Supposed to be there is no unique solution but I found it.

We are looking for v, so we try to eliminate x,L,t1,t2.

We can eliminate t1 from (1) and (2).

From (1), t1 = x/60

From (2), t1 = 2L/5v

t1 = t1,

x/60 = 2L/5v

Cross multiply,

x*5v = 60*2L

vx = 24L ------(5)

Likewise, we can eliminate t2 from (3) and (4).

From (3), t2 = (x+L)/60

From (4), t2 = 3L/5v

t2 = t2,

(x+L)/60 = 3L/5v

Cross multiply,

(x+L)*5v = 60*3L

(x+L)v = 36L -----(6)

We can eliminate L from (5) and (6).

From (5), L = vx/24 ---***

From (6),

vx +vL = 36L

vL -36L = -vx

L(v-36) = -vx

L = -vx/(v-36)

L = vx/(36-v) ---***

L = L,

vx/24 = vx/(36-v)

Divide both sides by vx,

1/24 = 1/(36-v)

24 = 36 -v

v = 36 -24

v = 12 mph --------answer.

-----------

The idea was for the man to beat the train at any of the two ends of the bridge. Apparently, the problem means if the man and the train reach the same end of the bridge at the same time, the man will be saved.