\(2x^2+y^2-2xy+2x+1=0\)
\(\Leftrightarrow x^2-2xy+y^2+x^2+2x+1=0\)
\(\Leftrightarrow\left(x-y\right)^2+\left(x+1\right)^2=0\)
\(\Rightarrow\left\{{}\begin{matrix}\left(x-y\right)^2=0\\\left(x+1\right)^2=0\end{matrix}\right.\Rightarrow\left\{{}\begin{matrix}x-y=0\\x+1=0\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}x=y\\x=-1\end{matrix}\right.\)
=> x=y=-1