Lời giải:
Nếu $x+y+z=0$ thì:
$\frac{x+y-z}{z}=\frac{-z-z}{z}=-2$
$\frac{y+z-x}{x}=\frac{-x-x}{x}=-2$
$\frac{z+x-y}{y}=\frac{-y-y}{y}=-2$
(thỏa mãn đkđb)
Khi đó:
$P=(1+\frac{x}{y})(1+\frac{y}{z})(1+\frac{z}{x})=\frac{(x+y)(y+z)(z+x)}{xyz}$
$=\frac{(-z)(-x)(-y)}{xyz}=\frac{-xyz}{xyz}=-1$
Nếu $x+y+z\neq 0$
Áp dụng TCDTSBN:
$\frac{x+y-z}{z}=\frac{y+z-x}{x}=\frac{z+x-y}{y}=\frac{x+y-z+y+z-x+z+x-y}{z+x+y}=\frac{x+y+z}{x+y+z}=1$
$\Rightarrow x+y=2z; y+z=2x, z+x=2y$. Khi đó:
$P=\frac{(x+y)(y+z)(z+x)}{xyz}=\frac{2z.2x.2y}{xyz}=8$