Prove that $b^2-4ac \equiv 0 \pmod{p}$ 
Let $a,b,c,r$ be integers and $p \geq 5$ be a prime such that $ax^2+bx+c \equiv a(x-r)^2 \pmod{p}$. Prove that $b^2-4ac \equiv 0 \pmod{p}$. Does the same hold if $p = 3$? 

I wasn't sure how to go about proving this. We can rearrange the congruence to get $$x(b+2ar)+c-ar^2 \equiv 0 \pmod{p}.$$ How do we continue from here?

Since $ax^2+bx+c \equiv a(x-r)^2 \pmod{p}$ is a "forall" statement for all the x in least residue system  with respect to p,
$x(b+2ar)+c-ar^2 \equiv 0 \pmod{p}$  also satisfies this condition. 
Since $0$ and $1$ are in the  least residue system  with respect to p, Therefore
$$0 \times (b+2ar)+c-ar^2 \equiv c-ar^2 \equiv 0 \pmod{p} \tag{1}$$
$$1 \times (b+2ar)+c-ar^2 \equiv (b+2ar) \equiv 0 \pmod{p} \tag{2}$$
Then from $(1)$ and $(2)$, $b^2 - 4ac \equiv (-2ar)^2 - 4a(ar^2) \equiv 4a^2r^2- 4a^2r^2 \equiv 0 \pmod{p}$
