I tried to prove this question by first considering the possible last digit of $p$ when $p=n^2+5$, but that reasoning got me nowhere. Then I tried to prove it by contrapositive, and however I just couldn't really find where to start.
Hence I'm here asking for some hints (only hints, no solution please).
Many thanks,
D.