Speed of two trains travelling side by side I'm a high school student, and I have come across a problem that I cannot solve. I feel there must be something obvious that I'm not seeing.

Problem: The distance between two train stations is $96$ km. One train covers this distance in $40$ minutes less time than another one. The second train is $12$ km/h faster than the first one. Find both trains' speeds.

What I have done: 
Set $v_1+12 = v_2$ (the speed of train $2$ is $12$km/h more than speed of train $2$), and $96/(v_1) = (96/v_2)-40$ (the time it takes for train 2 to transverse the distance between the stations is $40$ minutes less than the required by train $2$) Now, from here I get to:
$v_1 = v_2-12$.
\begin{align}
&\frac{96}{v_2-12} = \frac{96}{v_2}-40 \\
&\qquad\implies \frac{96}{v_2-12} = \frac{96-40v_2}{v_2} \\
&\qquad\implies v_2\cdot 96 = (v_2-12)\cdot (96-40v_2) \\
&\qquad\implies v_2\cdot 96 = v_2\cdot 96-40v_2^2-1152-380v_2 \\
&\qquad\implies 0 = -40v_2^2-380v_2-1152
\end{align}
Solving this quadratic equation yields no real roots.
Could you please suggest the right way to go?
 A: The question states that "One train covers this distance in 40 mins less than the other". Although it does not tell you which train, it is quite obvious that the faster train (i.e. train 2) takes 40 mins less.
So instead, it should be $96/(v2)=(96/v1)−40$.
A: I'll post this as an answer, since i'm not yet allowed to write comments. So, as mentioned in the comments (and the answer given by glowstonetrees) you might want to use $96/(v2)=(96/v1)−40$ instead. 
Also keep in mind that you are subtracting minutes from hours. Your final formula should be $96/(v2)=(96/v1)−(40/60)$.
A: Let $v_1$ km/hr denote the speed of the faster train, and $v_2$ km/hr denote the speed of the slower train (I seem to have reversed your notation—sorry, $v_1$ feels like faster variable to me than $v_2$).  First off, we can relate the amount of time it takes for each train to travel the 96 km to the speed of each train.  So, let
$$ t_1 \text{ hrs} = \frac{96 \text{ km}}{v_1 \ \frac{\text{km}}{\text{hr}}} = \frac{96}{v_1}\text{ hrs}
\qquad\text{and}\qquad
t_2 \text{ hrs} = \frac{96 \text{ km}}{v_2 \ \frac{\text{km}}{\text{hr}}}  = \frac{96}{v_2}\text{ hrs}\tag{1}$$
denote these two times.  We know that the faster train arrives 40 minutes (that is, $\frac{2}{3}$ of an hour—watch the units! (this is an easy mistake to make—I messed it up, too!)) earlier than the slower train, which implies that
$$ t_1 \text{ hrs} = t_2 \text{ hrs} - \frac{2}{3} \text{ hrs} = \left( t_2 - \frac{2}{3} \right)\text{ hrs}, $$
and we know that the faster train is 12 kph faster than the slower train, hence
$$ v_1 \ \frac{\text{km}}{\text{hr}} = v_2 \ \frac{\text{km}}{\text{hr}} + 12 \ \frac{\text{km}}{\text{hr}} = \left(v_2 + 12\right)  \ \frac{\text{km}}{\text{hr}}. $$
It should be noted that the only major mistake that I see in your work is in the above step—in your model the faster train takes more time to cover the distance, which is a problem. Substituting these into the equations at (1) (and eliding units—the units of time are hours, the unit of distance are kilometers, and the units of speed are km/hr), we get the system
$$
\begin{cases}
t_2 - \dfrac{2}{3} = \dfrac{96}{v_2 + 12} \\
t_2 = \dfrac{96}{v_2}.
\end{cases}
$$
Can you solve it from here?
A: A method that doesn't require the quadratic formula: 
Once you've corrected the errors mentioned in the other answers, you should have
96/(v+12) = 96/v – 2/3
You can rewrite that as
8/(v/12 +1) = 8/(v/12) -2/3
12/(v/12+1)=12/(v/12) – 1
This is in some ways a more complicated form, but if we assume that each term is an integer, then v/12 and v/12+1 must be factors of 12. And what factors of twelve are there that differ by 1? Just 3,4. If we plug those in and check, 12/4 = 12/3 -1 => 3 = 4-1. So v/12 = 3 => v = 36 and the other speed is 4*12 = 48.
Also, when you get an equation like
v2⋅96=(v2−12)⋅(96−40v2)
You should divide out by the common factor of 8 and get
v2⋅12=(v2−12)⋅(12−5v2)
before multiplying it out.
