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