a) \(5x-5y+ax-ay\)
\(=\left(5x-5y\right)+\left(ax-ay\right)\)
\(=5\left(x-y\right)+a\left(x-y\right)\)
\(=\left(x-y\right)+\left(5+a\right)\)
b) \(a^3-a^2x-ay+xy\)
\(=\left(a^3-a^2x\right)-\left(ay-xy\right)\)
\(=a^2\left(a-x\right)-y\left(a-x\right)\)
\(=\left(a-x\right)\left(a^2-y\right)\)
c) \(xy\left(x+y\right)+yz\left(x+z\right)+xz\left(x+z\right)+2xyz\)
\(=xy\left(x+y\right)+yz\left(y+z\right)+xyz+xz\left(x+z\right)+xyz\)
\(=xy\left(x+y\right)+yz\left(x+y+z\right)+xz\left(x+y+z\right)\)
\(=xy\left(x+y\right)+z\left(x+y+z\right)\left(x+y\right)\)
\(=\left(x+y\right)\left(xy+zx+zy+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(z+x\right)\)