\(x\left(y^2+z^2\right)+y\left(z^2+x^2\right)+z\left(x^2+y^2\right)+2xyz=xy^2+xz^2+yz^2+x^2y++zx^2+zy^2+2xyz=xy\left(x+y+z\right)+yz\left(x+y+z\right)+xz\left(x+z\right)=\left(x+y+z\right)\left(xy+yz\right)+xz\left(x+z\right)=y\left(x+y+z\right)\left(z+x\right)+xz\left(x+z\right)=\left(x+z\right)\left(xy+y^2+yz+xz\right)=\left(x+y\right)\left(y+z\right)\left(z+x\right)\)