If $xyz=32$, find the minimal value of If $xyz=32;x,y,z>0$, find the minimal value of $f(x,y,z)=x^2+4xy+4y^2+2z^2$
I tried to do by $A.M.\geq M.G.$:
$\frac{x^2+4y^2+2z^2}{2}\geq\sqrt{8x^2y^2z^2}\to x^2+4y^2+2z^2\geq32$
But how can I maximaze 4xy?

Your application of AM-GM is wrong. The statement for AM-GM states that for positive integers $a_1, a_2, \dots, a_n$:
$$\frac{a_1 + a_2 + \dots + a_n}{n} \geq \sqrt[n]{a_1a_2\dots a_n}$$
with equality at $a_1 = a_2 = \dots = a_n$. Observe that
$$\frac{x^2+2xy+2xy+4y^2+z^2+z^2}{6} \geq \sqrt[6]{16x^4y^4z^4} = 16 \implies x^2 + 4xy + 4y^2 + 2z^2 \geq 96.$$
Equality occurs when $x^2 = 2xy = 4y^2 = z^2 \implies (x,y,z)=(4,2,4)$.
