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