a) \(M=a^2\left(a+b\right)-b\left(a^2-b^2\right)+1=a^3+a^2b-a^2b+b^3+1=a^3+b^3+1\)
b) \(P=x\left(x-y+1\right)-y\left(y+1-x\right)-2=x^2-xy+x-y^2-y+xy-2=x^2+x-y-y^2-2\)
c) \(Q=\left(m+3\right)\left(m^2+3m-5\right)+\left(6-m\right)m^2+11=m^3+3m^2-5m+3m^2+9m-15+6m^2-m^3+11=12m^2+4m-4\)
a: Ta có: \(M=a^2\left(a+b\right)-b\left(a^2-b^2\right)+1\)
\(=a^3+a^2b-a^2b+b^3+1\)
\(=a^3+b^3+1\)