Ta có: \(a^3+b^3=\left(a+b\right)^3-3ab\left(a+b\right)\)
\(\Rightarrow x^3+y^3+z^3=\left(x+y\right)^3+z^3-3xy\left(x+y\right)\)
\(=\left(x+y+z\right)^3-3\left(x+y\right)z\left(x+y+z\right)-3xy\left(x+y\right)\)
\(=0-3xy\left(x+y\right)\)( do x+y+z=0)
Lại có \(x+y+z=0\Leftrightarrow x+y=-z\)
\(\Rightarrow x^3+y^3+z^3=3xyz\)
Vậy \(B=\frac{3xyz}{-xyz}=-3\)