\(M=x^2\left(x+y\right)-y^2\left(x+y\right)+x^2-y^2+2\left(x+y\right)+3\)
\(=x^2\left(x+y\right)+x^2-y^2\left(x+y\right)-y^2+2\left(x+y\right)+2+1\)
\(=\left[x^2\left(x+y\right)+x^2\right]-\left[y^2\left(x+y\right)+y^2\right]+\left[2\left(x+y\right)+2\right]+1\)
\(=x^2\left(x+y+1\right)-y^2\left(x+y+1\right)+2\left(x+y+1\right)+1\)
Thay \(x+y+1=0\)vào biểu thức ta được: \(M=0-0+0+1=1\)