Ta có \(x^2+y^2+xy+x=y-1\)
\(\Leftrightarrow2x^2+2y^2+2xy+2x-2y+2=0\)
\(\Leftrightarrow\left(x+y\right)^2+\left(x+1\right)^2+\left(y-1\right)^2=0\)
\(\Leftrightarrow\left\{{}\begin{matrix}x+y=0\\x+1=0\\y-1=0\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}x=-1\\y=1\end{matrix}\right.\)
\(\Rightarrow B=\left(-1+1-1\right)^{2023}\) \(=\left(-1\right)^{2023}\) \(=-1\)