\(a.M-P+Q=0\\ =>M=P-Q\\ =>M=\left(3x^2y-2x+5xy^2-7y^2\right)-\left(3xy^2-7y^2-9x^2y-x-5\right)\\ =3x^2y-2x+5xy^2-7y^2-3xy^2+7y^2+9x^2y+x+5\\ =8x^2y+2xy^2-x+5\\ b.M-P-Q=0\\ =>M=P+Q\\ =\left(3x^2y-2x+5xy^2-7y^2\right)+\left(3xy^2-7y^2-9x^2y-x-5\right)\\ =-6x^2y+8xy^2-14y^2-3x-5\)
`a)M-P+Q=0`
`<=>M-3x^2y+2x-5xy^2+7y^2+3xy^2-7y^2-9x^2y-x-5=0`
`<=>M-12x^2y-2xy^2+x-5=0`
`<=>M=12x^2y+2xy^2-x+5`
`b)M-P-Q=0`
`<=>M=P+Q`
`<=>M=-6x^2y-4xy^2-14y^2-3x-5`