Assume $\displaystyle x^2 \equiv 1 \text{ mod }p$. That is, p divides $\displaystyle x^2-1$. This is a difference of two squares, and so split it up and realise that $\displaystyle p$ divides one of the two factors, because $\displaystyle p$ is prime...