Let $R=\{m+n\sqrt 2|m,n\in\mathbb{Z}\}$. Show that $m+n\sqrt2$ is a unit in $R$ iff $m^2-2n^2=\pm 1$. Hint: Show that if $(m+n\sqrt2)(x+y\sqrt 2)=1$ then $(m-n\sqrt 2)(x-y\sqrt2)=1$ I needed help with the foward direction
This is what I have so far: ($\rightarrow$). Suppose that $m+n\sqrt2$ is a unit. I want to show that $m^2-2n^2=(m+n\sqrt2)(m-n\sqrt2)=\pm 1$. Since $m+n\sqrt2$ is a unit there exists a $p\in R$ such that $p*(m+n\sqrt2)=1$ where $p=(x+y\sqrt 2)$. But from here i'm stuck showing $(m-n\sqrt 2)(x-y\sqrt2)=1$. Any hints or help would be great.Thanks
Edit:
Using what I got as a hint below I got since $(m-n\sqrt 2)(x-y\sqrt2)=(m^2-2n^2)(x^2-2y^2)=1\implies (m^2-2n^2)=\frac{1}{x^2-2y^2}$. But since $m^2-2n^2$ is an integer it follows that $(x^2-2y^2)=\pm 1$ and $(m^2-2n^2)=\pm 1$ since $1*1=1$ and $-1*-1=1$.