Assume that $y$ is a function of $x$. Find $y' = \dfrac{dy}{dx}$ for $(x-y)^2 = x + y - 1$.
I've worked out the problem multiple times, but I continue to get a different answer than the correct answer. First I multiply out the $(x-y)^2$ to $(x-y)(x-y)$ and work it out from there; after that I take the derivative of both sides, etc.
This is supposed to be the correct answer:
$y' = \frac{2y-2x+1}{2y-2x-1}$
But I keep getting:
$y' = \frac{2x-2y-1}{2x-2y+1}$
Help please? Thank you!