\(0\le x;y;z\le2\Rightarrow\left(2-x\right)\left(2-y\right)\left(2-z\right)\ge0\)
\(\Leftrightarrow8+2\left(xy+yz+zx\right)-4\left(x+y+z\right)-xyz\ge0\)
\(\Leftrightarrow2\left(xy+yz+zx\right)\ge4+xyz\ge4\)
\(\Rightarrow xy+yz+zx\ge2\)
\(\Rightarrow Q=\left(x+y+z\right)^2-2\left(xy+yz+zx\right)\le9-2.2=5\)
\(Q_{max}=5\) khi \(\left(x;y;z\right)=\left(0;1;2\right)\) và hoán vị