\(x^2-y=y^2-x< =>x^2-y-y^2+x=0< =>x^2-y^2-y+x=0\)
\(< =>\left(x-y\right)\left(x+y\right)+\left(x-y\right)=0< =>\left(x-y\right)\left(x+y+1\right)=0\)
\(< =>\orbr{\begin{cases}x-y=0\\x+y+1=0\end{cases}< =>\orbr{\begin{cases}x=y\\x+y=-1\end{cases}}}\)
Mà \(x\ne y=>x+y=-1\)
Vậy \(M=\left(x+y\right)^2-3\left(x+y\right)=\left(-1\right)^2-3.\left(-1\right)=1+3=4\)