1. \(xy\left(a^2+2b^2\right)-ab\left(2x^2+y^2\right)\)
\(=xya^2+2xyb^2-2abx^2-aby^2\)
\(=xya^2-aby^2-2abx^2+2xyb^2\)
\(=ay\left(ax-by\right)-2bx\left(ax-by\right)\)
\(=\left(ay-2bx\right)\left(ax-by\right)\)
2. \(xy\left(a^2+2b^2\right)+ab\left(2x^2+y^2\right)\)
\(=xya^2+2xyb^2+2abx^2+aby^2\)
\(=xya^2+aby^2+2abx^2+2xyb^2\)
\(=ay\left(ax+by\right)+2bx\left(ax+by\right)\)
\(=\left(ay+2bx\right)\left(ax+by\right)\)