\(=\left(x-3\right)\left(x+2\right)+x\left(x-3\right)=\left(x-3\right)\left(x+2+x\right)=\left(x-3\right)\left(2x+2\right)=2\left(x+1\right)\left(x-3\right)\)
\(x\left(x+2\right)+x\left(x-3\right)-3\left(x+2\right)\)
\(=\left(x+2\right)\left(x-3\right)+x\left(x-3\right)\)
\(\left(x+3\right)\left(2x+2\right)=2\left(x+1\right)\left(x+3\right)\)