\(\left(x+y+z\right)^3=\left(x+y\right)^3+z^3+3\left(x+y\right)z\left(x+y+z\right)\)
\(=x^3+y^3+z^3+3xy\left(x+y\right)+3z\left(x+y\right)\left(x+y+z\right)\)
\(=x^3+y^3+z^3+3\left(x+y\right)\left(xy+xz+yz+z^2\right)\)
\(=x^3+y^3+z^3+3\left(x+y\right)\left[x\left(y+z\right)+z\left(y+z\right)\right]\)
\(=x^3+y^3+z^3+3\left(x+y\right)\left(y+z\right)\left(z+x\right)\)