$\begin{aligned}
&x^2 + bx + c = (x - p)(x-q)
&x^2 + bx + c = x^2 - x(p + q) + pq
&-(p + q) = b; pq = c
\end{aligned}$

We want to extract the values of $b$ and $c$ from this. To do so, consider
the symmetric functions:
$(p + q)^2 = b^2
(p - q)^2 = (p + q)^2 - 4pq = b^2 - 4c$

Hence we get that
$p - q = \pm\sqrt{b^2 - 4c}$

From this, we can solve for $p, q$, giving us:
$p = ((p + q) + (p - q))/2 = (-b \pm \sqrt{b^2 - 4c})/2$