<s>[INST] If $x,y,z \in \mathbb{R}$, $x^2+4y^2+16z^2=48, xy+4yz+2zx=24$, then find $x^2+y^2+z^2$. 
If $x,y,z \in \mathbb{R}$ are such that $x^2+4y^2+16z^2=48$ and $xy+4yz+2zx=24$, then find $x^2+y^2+z^2$.

I can find the answer if I find the value of $x+y+z$ and $xy+yz+zx$. But I don't know how to do that. I found that $$(x+2y+4z)^2=144 \implies x+2y+4z=±12$$
But I can't progress after this.
 [/INST] Let $a=x$, $b:=2y$, and $c:=4z$.  Then,
$$\begin{align}a^2+b^2+c^2&=x^2+4y^2+16z^2=48=2\cdot 24\\&=2\cdot(xy+4yz+2zx)=bc+ca+ab\,.\end{align}$$
It is well known that, for real numbers $a$, $b$, and $c$, $a^2+b^2+c^2=bc+ca+ab$ if and only if $a=b=c$.  That is, $$x=2y=4z\,.$$
Since $x^2+4y^2+16z^2=48$, we get $$(x,y,z)=\pm(4,2,1)\,.$$
That is,
$$x^2+y^2+z^2=16+4+1=21\,.$$
</s>