You just need to simplify the equation.
Here are the steps, from the beginning to the second line of your problem.
You have the following equation:
so let's say
This is a quadratic equation that you should know how to solve, using the (in)famous quadratic formula:
In our case,
we readily see that we have
So plugging-in these numbers in the quadratic formula gives the following:
(Note that this is representing the two solutions of the equation with
Replacing the x back to its original form:
So here we are at the second line. I hope this helped.
We know that the roots of general quadratic equation of the form
Applying this to our quadratic equation of