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