Let $0\le x;y;z\le 3$. Find maximum value of function $$M=\sqrt{x^2+y^2-2xy}+\sqrt{y^2+z^2-2yz}+\sqrt{z^2+x^2-2xz}$$
I can rewrite the function $M=|x-y|+|y-z|+|z-x|$
WLOG $0\le x\le y\le z\le 3$ so we have $M=y-x+z-y+z-x=2z-2x$
I dont know how to use $0\le x;y;z\le 3$ to evaluate the last inequality.
My idea : $M=|x-y|+|y-z|+|z-x|\le \sqrt{((x-y)^2+(y-z)^2+(x-z)^2)(1+1+1)}$
"=" occurs when $|x-y|=|y-z|=|z-x|$ but wrong.

You need to make also one step only:
Let $y=y=0$ and $z=3$.
Thus, we got a value $6$.
We'll prove that it'a maximal value.
Indeed, let $x\geq y\geq z$.
Thus, we need to prove that $$x-y+x-z+y-z\leq6$$ or $$x-z\leq3,$$ which is true because $$x-z\leq x\leq3.$$