Find all polynomials $P(x)$ that satisfy $$P\left((x - y)^2\right) + P\left((y - z)^2\right) + P\left((z - x)^2\right) = 18P\left(\left(\frac{(x + y + z)^2}{3}\right)^2\right)$$ when $x,y,z \in \mathbb R$ and $xy + yz + zx = 0$.
This is from POSN Camp 2 Thailand.
I've done it and got $P(x) = 0$ or $P(x) = ax^2$ for some $a \in \mathbb R$. I checked my answer and found that $P(x) = 0$ only. But, I found out after discussing with my friend who did it later that $P(x) = ax^2$ are solutions, too, and that I had checked it wrongly. What it the solution of this problem? I am confused. Am I correct or wrong?
Note: I believe the RHS should be $18 P \left ( \frac{ (x+y+z)^2 } { 3} \right ) $. If not, ignore this.