\(5x^2+10xy=5x\left(x+2y\right)\)
\(x^2+xy-3x-3y=x\left(x+y\right)-3\left(x+y\right)=\left(x-3\right)\left(x+y\right)\)
\(x^2+2x+1-y^2=\left(x+1\right)^2-y^2=\left(x+1-y\right)\left(x+1+y\right)\)
\(x^2-7x+6=x^2-x-6x+6=x\left(x-1\right)-6\left(x-1\right)=\left(x-1\right)\left(x-6\right)\)