Weird contradiction between equations A guy that I tutor came to me with the following question:
The time it takes for body $A$ to pass 160 km is 5 hours longer than the time it takes for body B to pass 90 km.
The speed of body A is greater by $m$ than the speed of body B. ($m$ > 0)
Question: Use $m$ to express the speed of body B.
-------------------------------------------------

I solved it the following way:
Let $t$ be the time it takes for body B to pass 90 km, and let $v$ be the speed in which body B travels. We get the following system of two equations, where $m$ is a parameter.
$v\cdot t=90$
$(v+m)\cdot (t+5)=160$ , because body A needs 5 hours more, with a speed greater than $v$ by $m$ to pass 160 km.
Solving this system will result in $$v = {14-m\pm\sqrt{m^2-100m+196}\over {2}}$$
Which is the correct result.
My student, though, solved it in a bit more complicated way. However, I looked at his way for a very long time.. And it just seems correct, but it gives a different result. Here is his approach:
Let $t$ be the time it takes for body B to travel 90 km. Now, by the global formula of $S=v\cdot t$ (distance equals velocity times time), we get that his speed equals $\frac{90}t$. Also, with the same logic, we get that body A's speed equals $\frac{160}{t+5}$. Now, body A travels in a speed greater than that of body B by exactly $m$. Putting this as an equation give us:
$$\frac{160}{t+5} = \frac{90}t+m$$
This seems correct to me, as I can get to that equation using my approach too.
From now, his way was to find $t$ and then substitute the value of $t$ he gets in $\frac {90}t$.
So he (and eventually I aswell) both got:
$$t = {5(14-m\pm\sqrt{m^2-100m+196})\over {2m}}$$
Computations in Mathematica also resulted in the exact same values.
However, and here's the problem.. When substituting this value of $t$ in $\frac {90}t$, I don't get the same, correct result for the speed of body B. Instead I get the following:
$$v = \frac {90}t = \frac {36m}{14-m\pm\sqrt{m^2-100m+196}}$$
So, what is going on here? Where am I wrong? I'm not even sure I'm wrong but, this is just weird.. Can anyone spot the 'mistake' here or shed some light in some way? Even if the mistake is stupid or something, spare your reply if you intend to mock.
Thanks a lot in advance.

$$\frac {36m}{14-m+\sqrt{m^2-100m+196}}\\
=\frac{36m(14-m-\sqrt{m^2-100m+196})}{(14-m+\sqrt{m^2-100m+196})(14-m-\sqrt{m^2-100m+196})}\\
=\frac{36m(14-m-\sqrt{m^2-100m+196})}{(14-m)^2-(m^2-100m+196)}\\
={14-m-\sqrt{m^2-100m+196}\over {2}}$$
