A simple elementary school math/physics problem - but where's the mistake? I've come across this problem and managed to get the right answer, but there remains a mystery that I wasn't quite able to solve: the minus sign (or a lack thereof)! Here's the problem and my solution:
A man walks across a bridge and when he's $40 \%$ of the way through, he spots a train incoming towards him at $40$ mph. He (through superhuman calculational ability or just massive pessimism) knows that if he would start sprinting towards the train, he would be run over at exactly the end of the bridge. He also knows that if he were to turn around and start sprinting away, he would be run over exactly at the beginning of the bridge. The question is to calculate how fast he can sprint.
So I pick a 'coordinate system' such that the origin is the beginning of the bridge, the end of the bridge is at a distance $d$ from the origin. At time $t=0$, the man's position is $\frac{2}{5}d$ and the train is at $d+l$. Denote:
$$s^{\pm}_{1}(t) \equiv \frac{2}{5}d \pm vt$$
$$s_2 (t) = d+l -40t$$
These are the positions of the man and the train respectively as functions of time. The plus/minus in the man's position is because he can either run towards or away from the train. With this notation, the conditions we are given are:
$$s^+_1(t_0)=s_2(t_0)=d$$
$$s^-_1(t_1)=s_2(t_1)=0$$
From the first condition, we get a system of equation which after eliminating the time, gives $$v=24 \frac{d}{l}.$$
From the second condition, we get $$v=16 \frac{d}{d+l}.$$
This implies $$v=-8.$$
The correct answer is $v=8$mph, so the solution is more or less correct. But the way I've set up the notation, shouldn't I get a positive answer? Where's the mistake?

You should put your train to the "left" of the guy. Otherwise, your second paragraph is physically impossible. 
