\(x^2-y^2-2x+2y=\left(x+y\right)\left(x-y\right)-2\left(x-y\right)=\left(x+y-2\right)\left(x-y\right)\) \(2x+2y-x^2-xy=2\left(x+y\right)-x\left(x+y\right)=\left(2-x\right)\left(x+y\right)\)
\(3a^2-6ab+3b^2-12c^2=3\left(a^2-2ab+b^2-4c^2\right)=3\left(a-b\right)^2-3\left(2c\right)^2=3\left(a-b+2c\right)\left(a-b-2c\right)\) \(x^2-25+y^2+2xy=\left(x+y\right)^2-25=\left(x+y-5\right)\left(x+y+5\right)\)
\(a^2+2ab+b^2-ac-bc=\left(a+b\right)^2-c\left(a+b\right)=\left(a+b\right)\left(a+b-c\right)\)
\(x^2-2x+1-4y^2-4y-1=\left(x-1\right)^2-\left(2y+1\right)^2=\left(x+2y\right)\left(x-2y-2\right)\)\(x^2\left(x-1\right)-16\left(x-1\right)=\left(x-1\right)\left(x^2-16\right)=\left(x-1\right)\left(x+4\right)\left(x-4\right)\) \(x^2y-x^3-9y+9x=x^2\left(y-x\right)-9\left(y-x\right)=\left(y-x\right)\left(x^2-9\right)\left(y-x\right)\left(x-3\right)\left(x+3\right)\)