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