a) \(2\left(x-y\right)+x^2-y^2\\ =2\left(x-y\right)+\left(x^2-y^2\right)\\ =2\left(x-y\right)+\left(x+y\right)\left(x-y\right)\\ =\left(x-y\right)\left(2+x-y\right)\)
b) \(x^3-4x^2-9x+36\\ =x^2\cdot x-4x^2-9x+36\\ =x^2\left(x-4\right)-9\left(x-4\right)\\=\left(x-4\right)\left(x^2-9\right)\\ =\left(x-4\right)\left(x-3\right)\left(x+3\right)\)
c) \(2x^2+2y^2-x^2z+2-y^2z-2\\ =2\left(x^2+y^2\right)-z\left(x^2+y^2\right)+\left(2-2\right)\\ =\left(x^2+y^2\right)\left(2-z\right)\)
d) \(x^3+y^3+2x^2-2xy+2y^2\\ =\left(x+y\right)\left(x^2-xy+y^2\right)+2\left(x^2-xy+y^2\right)\\ =\left(x^2-xy+y^2\right)\left(x+y+2\right)\)
e) \(x^2y+xy^2+x^2z+xz^2+y^2z+yz^2+2xyz\\ =x^2y+xy^2+xyz+x^2z+xz^2+xyz+y^2z+yz^2\\ =xy\left(x+y+z\right)+xz\left(x+y+z\right)+yz\left(y+z\right)\\ =\left(y+z\right)\left(x^2+xy+xz+yz\right)\\ =\left(y+z\right)\left(z+x\right)\left(x+y\right)\)