Show that, $$\forall\{x,y,z\}\subset\mathbb{Z}, \ x^2+ 2y^2 = 3z \Leftrightarrow 3\mid x\land y$$
I thought this was a trivial question when I first looked at it, but I found it difficult to prove, so I want someone to verify whether or not my proof is correct.
$1^{\text{st}}$ Attempt:
$$\begin{align} &3\mid x\land y \Leftrightarrow x = 3r, \ y = 3s\quad (\forall r, s\in\mathbb{Z}) \\ \therefore \ &(3r)^2 + 2(3s)^2 = 9r^2 + 18s^2 = 3\cdot3(r^2 + 2s^2) = 3z\tag*{$\Box$}\end{align}$$ However, I then realised that above was not a sufficient proof. I only proved that $$3\mid x\land y \Rightarrow x^2 + 2y^2 = 3z.\tag*{$\boxed{\begin{align} &\text{Nota bene:} \\ &\text{Both statements} \\ &\text{are not identical.}\end{align}}$}$$ Since the statement in the yellow box is unidentical to the statement above (the implications are different), I have proved the wrong assertion.
$2^{\text{nd}}$ Attempt:
I was able to show that, $$\forall n\in\mathbb{R}\supset \mathbb{Z}, \ (n + 1)^2 + (n^3 + n^2)^2 + 2(n^2 + n)^2 = (n^3 + n^2 + n + 1)^2.$$ By substituting $x = n^3 + n^2$ and $y = n^2 + n$, it follows that, $$3z = (n^3 + n^2 + n + 1)^2 - (n + 1)^2 = (n^3 + n^2 + 2n + 2)(n^3 + n^2).$$ According to Euclid’s Lemma, $3$ must divide either $n^3 + n^2 + 2n + 2$ or $n^3 + n^2$. By letting $n = 1$, we see that $3$ divides the former, therefore we will suppose that for all $n\in\mathbb{Z}^+$, $3$ divides the former. $$\begin{align} &\therefore \ 3\mid (n+1)^3 + (n+1)^2 + 2(n + 1) + 2 = \big(n^3 + 1 + 3n(n + 1)\big) + (n^2 + 1 + 2n) + (2n + 2) + 2 \\ &\Leftrightarrow \ 3\mid n^3 + n^2 + n(n+1) + 4n + 6 \\ &\Leftrightarrow \ 3\mid n^3 + n^2 + n^2 + n + 4n\end{align}$$ Since $\Box \ 3\mid n^3 + 2n$, it follows, then, that $$\begin{align} &3\mid n^2 + n^2 + n + 2n = 2n^2 + 3n \\ \Leftrightarrow \ &3\mid 2n^2 = 2\cdot n\cdot n \\ \Leftrightarrow \ &3\mid n\end{align}\tag*{$\begin{align} \because \ \gcd(2,3)=1 \\ 2<3 \end{align}$}$$
It has already been established that $x = n^3 + n^2$ and $y = n^2 + n$. $$\therefore \ 3\mid x\land y\tag*{$\Box$}$$ However, this is not a sufficient proof either for this has constraints on the values of $x$ and $y$.
Could somebody please help me? Thank you in advance.