Let,
$$x^2 + px + q = (x - p/2)^2 + q - p^2/4 = \frac{4q - p^2}{4}.$$ This is zero if and only if
$$(x-p/2)^2 = \frac{p^2 - 4q}{4}.$$
Why are both roots real if and only if $$p^2 - 4q \ge 0$$?
Let,
$$x^2 + px + q = (x - p/2)^2 + q - p^2/4 = \frac{4q - p^2}{4}.$$ This is zero if and only if
$$(x-p/2)^2 = \frac{p^2 - 4q}{4}.$$
Why are both roots real if and only if $$p^2 - 4q \ge 0$$?
It should be a comment, but I make it a quick answer. Reason is: $\left(x-\frac{p}{2}\right)^2 \ge 0$.