Let $p$ be prime, prove that for any integer $r$, there at most $2$ solutions to the equation $x^2-r \equiv 0\pmod p$.
I don't understand the question as if $p=2$, and $r$ odd, then $x^2$ will need to be odd, and we have an infinite number of solutions.
Maybe this is true for $p>2$, but I don't really know how to prove it.
If $a$ and $x$ are solutions of $x^2 \equiv r \pmod p,$
then $x^2 - r \equiv x^2 - a^2 = (x-a)(x+a) \equiv 0 \pmod p$.
Since $p$ is prime, $p | (x-a)(x+a)$ means $p | (x-a)$ or $p | (x+a)$, i.e., $x \equiv a$ or $-a \pmod p$.
Thus, there can be at most two solutions.