Ta có \(x+y+z+\sqrt{xyz}=4\Rightarrow4x+4y+4z+4\sqrt{xyz}=16\)
Ta lại có \(\sqrt{x\left(4-y\right)\left(4-z\right)}=\sqrt{x\left(16-4y-4z+yz\right)}=\sqrt{x\left(4x+4\sqrt{xyz}+yz\right)}=\sqrt{4x^2+4x\sqrt{xyz}+xyz}=\sqrt{\left(2x+\sqrt{xyz}\right)^2}=2x+\sqrt{xyz}\)
Tương tự \(\sqrt{y\left(4-z\right)\left(4-x\right)}=2y+\sqrt{xyz}\)
\(\sqrt{z\left(4-x\right)\left(4-y\right)}=2z+\sqrt{xyz}\)
Suy ra \(P=\sqrt{x\left(4-y\right)\left(4-z\right)}+\sqrt{y\left(4-z\right)\left(4-x\right)}+\sqrt{z\left(4-x\right)\left(4-y\right)}-\sqrt{xyz}=2x+\sqrt{xyz}+2y+\sqrt{xyz}+2z+\sqrt{xyz}-\sqrt{xyz}=2x+2y+2z+2\sqrt{xyz}=2\left(x+y+z+\sqrt{xyz}\right)=2.4=8\)