1) \(x\left(x-y\right)+\left(x+y\right)\left(x-y\right)\)
\(=\left(x-y\right)\left(x+x+y\right)\)
\(=\left(x-y\right)\left(2x+y\right)\)
2) \(2a\left(a-1\right)-2\left(a+1\right)^2\)
\(=2\left[a\left(a-1\right)-\left(a+1\right)^2\right]\)
\(=2\left(a^2-a-a^2-2a-1\right)\)
\(=2\left(-3a-1\right)\)
3) \(\left(x+2\right)^2-\left(x-1\right)^2\)
\(=\left(x+2-x+1\right)\left(x+2+x-1\right)\)
\(=3\left(2x+1\right)\)
4) \(x\left(x-3\right)^2-x\left(x+5\right)\left(x-2\right)\)
\(=x\left[\left(x-3\right)^2-\left(x+5\right)\left(x-2\right)\right]\)
\(=x\left[\left(x^2-6x+9\right)-\left(x^2+3x-10\right)\right]\)
\(=x\left(x^2-6x+9-x^2-3x+10\right)\)
\(=x\left(-9x+19\right)\)