\(x^2+y^2+1+2xy-2x-2y+y^2-4y+4=0\)
\(\Leftrightarrow\left(x+y-1\right)^2+\left(y-2\right)^2=0\)
\(\Leftrightarrow\left\{{}\begin{matrix}x+y-1=0\\y-2=0\end{matrix}\right.\) \(\Rightarrow\left\{{}\begin{matrix}x=-1\\y=2\end{matrix}\right.\)
\(\Rightarrow\frac{x^2+5xy+51}{x-y}=\frac{1-10+51}{-1-2}=-14\)