Lời giải:
a. $xy(x+y)-y(x+y)^2+y^2(x-y)$
$=y(x+y)[x-(x+y)]+y^2(x-y)$
$=y(x+y)(-y)+y^2(x-y)$
$=-y^2(x+y)+y^2(x-y)$
$=y^2(x-y)-y^2(x+y)=y^2[(x-y)-(x+y)]$
$=y^2(-2y)=-2y^3$
b.
$x(x+y)^2-y(x+y)^2+xy-x^2$
$=[x(x+y)^2-y(x+y)^2]-(x^2-xy)$
$=(x+y)^2(x-y)-x(x-y)$
$=(x-y)[(x+y)^2-x]=(x-y)(x^2+2xy+y^2-x)$
a: \(xy\left(x+y\right)-y\left(x+y\right)^2+y^2\left(x-y\right)\)
\(=\left(x+y\right)\left[xy-y\left(x+y\right)\right]+y^2\left(x-y\right)\)
\(=\left(x+y\right)\left(xy-xy-y^2\right)+y^2\left(x-y\right)\)
\(=y^2\left(-x-y\right)+y^2\left(x-y\right)\)
\(=y^2\left(-x-y+x-y\right)=-2y\cdot y^2=-2y^3\)
b: \(x\left(x+y\right)^2-y\left(x+y\right)^2+xy-x^2\)
\(=\left(x+y\right)^2\left(x-y\right)+x\left(y-x\right)\)
\(=\left(x+y\right)^2\cdot\left(x-y\right)-x\left(x-y\right)\)
\(=\left(x-y\right)\left[\left(x+y\right)^2-x\right]\)