Inside the radical, the last term of the discriminant has factors
like (a + b)(a - b) = a2 - b2, so:

Now, expand and simplify:

So, there are 2 solutions (of course...). Taking the positive sign
in the numerator of equation 5 gives:

Physically, this means that no collision took place - the velocity
of m1 was unchanged. That isn't the solution we have come
this far to find. Taking the negative sign in the numerator of
equation 5 gives: