Finding integer solutions to $(x-y)^2+(y-z)^2+(z-x)^2=2022$ This was from round A of the Awesomemath Summer Program application. The deadline was yesterday and we can discuss the problems now.

Find all integer triples $(x,y,z)$ which satisfy
$$(x-y)^2+(y-z)^2+(z-x)^2=2022$$

I tried a couple of things. First I noticed $x-y+y-z+z-x=0,$ so if we let $a=x-y, b=y-z,c=z-x$ than we have
$$\begin{align}
a^2+b^2+c^2&=2022 \tag1\\
a+b+c &=0 \tag2\\ 
(a+b+c)^2-2ab-2bc-2ca &=2022 \tag3
\end{align}$$ So,
$$-2ab-2bc-2ca=2022 \tag4$$
so
$$ab+bc+ca=-1011 \tag5$$
However, it is tricky to proceed from here.
I also recalled the factorization
$$x^2+y^2+z^2-xy-yz-zx=\frac{1}{2}((x-y)^2+(y-z)^2+(z-x)^2)=1011 \tag6$$ This also equals $$x(x-y)+y(y-z)+z(z-x) \tag7$$
but this doesn't seem promising.
I also tried to factorize $2022=2 \cdot 3 \cdot 337$, but I am not sure what to do after prime factorizing.
So far, I feel like my first approach is the most promising, but I am not sure how to finish with it.

I am going from here: instead of dividing two, I am going to multiple two.
$$4044=2((x-y)^2+(y-z)^2+(z-x)^2)=(2x-y-z)^2+3(y-z)^2$$
WLOG $x\ge y\ge z$ Therefore set $2x-y-z=a$ and $y-z=b$ we are finding the solution of $a^2+3b^2=4044$. After trying, we have three solutions: $(63,5),(39,29),(24,34)$. $(63,5)$ yields $x=34+z,y=5+z$, $(39,29)$ yields $x=34+z,y=29+z$, and $(24,34)$ does not yield $x\ge y\ge z$ solution. These two solutions are "somewhat equivalent." So, the solutions $x=34+z,y=5+z$ and $x=34+z,y=29+z$ if ordered $x\ge y\ge z$, or, all the solutions are $x,y,z$, when they ordered as $a\ge b\ge c$ and $a-b,b-c$ is a permutation of $5$ and $29$.
