If $x+y+z=12$ and $x^2+y^2+z^2=54$ then prove that one has to be smaller or equal to 3 and one has to be bigger or equal than 5.
So I got that $xy+yz+zx=45$ and with that I had a function with x,y,z as zeros: $f(a)=a^3-12a^2+45a-k$, where k=xyz. I get that $f'(a)=3(a-3)(a-5)$, but I can't prove what I need with that.
Fleshing out the comment by peterwhy.
Assume first that $x,y,z$ are all distinct. W.l.o.g. we can assume that $x>y>z$. Then $x,y,z$ are the three zeros of $f(a)$. By Rolle's theorem $f'(a)$ must have a zero between $z$ and $y$ and another zero between $y$ and $x$. But you know the zeros of $f'(a)$, so this shows that $$z<3<y<5<x.$$
Ok. That leaves us with the case when two or more of them are equal. Without loss of generality we assume that $x=y$. Then you get the system $2x+z=12$, $2x^2+z^2=54$. I'm sure you can find the solutions of that system, and verify the claim in this case also.