<s>[INST] Determine the largest and smallest of the rational numbers $x$, $y$, $z$ if $x^2+4y^2+z^2-4xy-4yz+2xz-2x+2z+2=0$ 
Determine what number out of three rational numbers $x$, $y$, $z$ is the biggest and smallest one if following equality is true:
$$x^2+4y^2+z^2-4xy-4yz+2xz-2x+2z+2=0$$

I think it may be somewhat connected with full squares extraction
$$(x-2y)^2+(z+1)^2-2z(2y-x)-2x+1=0$$
Or
$$(z-2y)^2+(x-1)^2-2x(2y-z)+2z+1=0$$
Or
$$(x+z)^2-4y(y-x-z)-2(x-z-1)=0$$
But i am still not quite sure, what to do next
 [/INST] Let's start by rewriting the equality as
$$
(x+z-2y)^2 + 2 = 2(x-z)
$$
Now complete the square on the LHS first by adding $2(x+z-2y)$ to both sides:
$$
(x+z-2y+1)^2 + 1 = 2(x-z) + 2(x+z-2y) = 4(x-y)
$$
And again complete the square by subtracting $2(x+z-2y)$:
$$
(x+z-2y-1)^2 + 1 = 2(x-z) - 2(x+z-2y) = 4(y-z)
$$
Since LHS is positive in all 3 equations, you can now determine the ordering between the 3 variables: $x > y >z$
</s>