ta có: \(x^2-y=y^2-x\)\(\Leftrightarrow x^2-y^2=-\left(x-y\right)\)\(\Leftrightarrow\left(x-y\right)\left(x+y\right)=-\left(x-y\right)\)
\(\Leftrightarrow x+y=-1\)
do đó: \(A=\left(x+y\right)^2-3\left(x+y\right)\)\(=\left(-1\right)^2-3.\left(-1\right)\)\(=4\)