a: \(=10\left(x-y\right)-2a\left(x-y\right)\)
\(=2\left(x-y\right)\left(5-a\right)\)
b: \(=\left(x-y\right)^2-4z^2=\left(x-y-2z\right)\left(x-y+2z\right)\)
c: \(=\left(3x-y\right)\left(3x+y\right)+\left(3x+y\right)=\left(3x+y\right)\left(3x-y+1\right)\)
d: \(=\left(x+y\right)\left(x^2-xy+y^2\right)-\left(x+y\right)\)
\(=\left(x+y\right)\left(x^2-xy+y^2-1\right)\)