How to convert a quadratic solution to an unusual format

Solution 1:

In general, the quadratic polynomial $ax^2+bx+c$ has roots $\dfrac{-b+\sqrt{b^2-4ac}}{2a}$ and $\dfrac{-b-\sqrt{b^2-4ac}}{2a}$. If you multiply the first root by $\dfrac{-b-\sqrt{b^2-4ac}}{-b-\sqrt{b^2-4ac}}=1$, you get $\dfrac{b^2-(b^2-4ac)}{-2ab-2a\sqrt{b^2-4ac}}=\dfrac{-2c}{b+\sqrt{b^2-4ac}}$. Doing the same with the other root, you for the desired expressions.

Note: I'm assuming you can actually do the division because the roots are non zero, which is what happens in your problem.