The problem:
Prove that the only integer solutions of the equation $x^3=y^2+2 $ are $x=3$ and $y=\pm 5 $.
I found these related posts:
Prove that diophantine equation has only two solutions.
Show that $x^2 + y^2 + z^2 = x^3 + y^3 + z^3$ has infinitely many integer solutions.
Show that $x^2-dy^2 = -2$ with $d = m^2+2$ has infinitetly many integer solutions
I have tried techinques similar to the ones used in those posts, however I have not been able to solve it yet.
Edit: The first comment gave me the hint of working in $\mathbb{Z}[\sqrt{-2}]$.
$$x^3=y^2-(-2)=(y+\sqrt{-2})(y-\sqrt{-2}) $$ And we define $a:=y+\sqrt{-2}$ and $b:=y-\sqrt{-2} $. Now I need to prove that $a$ is a cube in $\mathbb{Z}[\sqrt{-2}]$. As a side note, that would imply that $b$ is also a cube in $\mathbb{Z}[\sqrt{-2}]$. Once I prove that, I can use the answers in the post titled "The only natural number $x$ for which $x+\sqrt{-2}$ is a cube in $\mathbb{Z}[\sqrt{-2}]$ is $x=5$", and solve the problem.
How can I prove that $a$ is a cube in $\mathbb{Z}[\sqrt{-2}]$ ?