\(=xyz-xy-z\left(x+y\right)+x+y+z-1\)
\(=xy\left(z-1\right)-\left(x+y\right)\left(z-1\right)+z-1\)
\(=\left(z-1\right)\left(xy-x-y+1\right)\)
\(=\left(z-1\right)\left[x\left(y-1\right)-\left(y-1\right)\right]\)
\(=\left(x-1\right)\left(y-1\right)\left(z-1\right)\)