\(=xy\left(x+y\right)-2\left(x+y\right)=\left(xy-2\right)\left(x+y\right)\)
= xy.(x + y) - (2x + 2y)= xy.(x + y) - 2.(x + y) = (x + y).(xy - 2)
\(xy\left(x+y\right)-2x-2y\)
\(=xy\left(x+y\right)-\left(2x+2y\right)\)
\(=xy\left(x+y\right)-2\left(x+y\right)\)
\(=\left(xy-2\right)\left(x+y\right)\)
xy(x+y)-2x-2y= xy(x+y)-2(x+y)= (xy-2)(x+y)