For an odd prime $p$ and a positive integer $x$, prove that if $8x^p+1$ is a perfect square, then $p$ divides $x-1$.
I've tried modulo $p$ and factorizing with $8x^p=k^2-1$. It gives some sort of equation like $a^p-2b^p=1$ which does not help. I also tried $x=pk+1+r$ but didn't go well. The most curious part of this problem is that there seems to be no relationship between $x-1$ and $p$ (perhaps $x$ or $p$ maybe).