Theorem used: "Suppose that $p$ is an odd prime. If $p \nmid a$, then $x^2 ≡ a \pmod p$ has exactly two solutions or no solutions."
Question: If $p>3$ what are two solutions of $x^2 ≡ 4 \pmod p$?
Solution given in back: $2$ and $p-2$.
I am unable to figure out how we get this answer?
So far what I can think of is that: as $p>3$ and $p$ is a prime so $p$ must be $5$ or $7$ or $11$ something. So all of them are greater than $4$. So $x^2 ≡ 4 \pmod p$ must have solutions like $4$ and $p-4$. How can we get $2$ there?
Since $2^2=4$, it's sure that $2^2\equiv 4\pmod p$ for any $p$.
Thus, by the theorem you're citing, there must be another solution; since $$ (-2)^2=4 $$ also $-2\equiv p-2\pmod p$ is a solution.
Note that $p-2\not\equiv 2\pmod{p}$. The condition $p>3$ is irrelevant, just that it's an odd prime suffices.