We have a Diophanite equation $$x^2+2y^2=p.$$ Suppose $p$ is prime, and there exists a solution $(a,b)\in\mathbb{Z}\times\mathbb{Z}$ to the Diophanite equation. Prove that there exists $z\in\mathbb{Z}$ for which $z^2\equiv-2\bmod{p}$.
Hint: Show that $p\nmid{b}$, and hence $\overline{b}\in(\mathbb{Z}/p\mathbb{Z})^\times$; then use the multiplicative inverse of $\overline{b}$ modulo $p$ to construct $z$.
I already proved $\overline{b}\in(\mathbb{Z}/p\mathbb{Z})^\times$, but I'm struggling to use the multiplicative inverse of $\overline{b}$ to complete this proof. I would really appreciate any hints/suggestions.