How to prove $p^2 \mid \binom {2p} {p }-2$ for prime $p$?
Note that: $$\binom{2p}p=\sum_{i\mathop=0}^p\binom pi\binom p{p-i}=\sum_{i\mathop=0}^p\binom pi^2$$
In fact, this formula can be generalized:
$$\binom{a+b}r=\sum_{i\mathop=0}^r\binom ai\binom b{r-i}$$
The proof can be derived by considering the coefficient of $x^r$ in the expansion of $(1+x)^{a+b}$ and $(1+x)^a(1+x)^b$ respectively, which would be the same.
Now, from your hint, since $p$ is actually a prime, we have: $$p^2|\tbinom pi^2$$ where $1\le i\le p-1$.
Therefore: $$\sum_{i\mathop=0}^p\binom pi^2=\dbinom p0^2+\sum_{i\mathop=1}^{p-1}\binom pi^2+\binom pp^2\equiv\dbinom p0^2+0+\dbinom pp^2=2\mbox{ (mod p}^2\mbox{)}$$