\(a,Q=\left(-2x^3y+7x^2y+3xy\right)+P=\left(-2x^3y+7x^2y+3xy\right)+\left(3x^2y-2xy^2-4xy+2\right)\\ =-2x^3y+7x^2y+3xy+3x^2y-3xy^2-4xy+2\\ =-2x^3y^2+10x^2y-3xy^2-xy+2\)
\(b,M=\left(3x^2y^2-5x^2y+8xy\right)-P\\ =\left(3x^2y^2-5x^2y+8xy\right)-\left(3x^2y-2xy^2-4xy+2\right)\\ =3x^2y^2-5x^2y+8xy-3x^2y^2+2xy^2+4xy-2\\ =-3x^2y+12xy-2\)