Prove that for prime $p \gt 2$, $(p - 1)^{p - 1} \equiv p+1 \pmod{p^2}$.

Hint:

As $p-1$ is even, $$(p-1)^{p-1}=(1-p)^{p-1}$$

Use Binomial Expansion

$$(1-p)^{p-1}\equiv1-\binom{p-1}1p\equiv1-(p-1)p\equiv?\pmod{p^2}$$