Non homogenous differential equation based on a fraction I am new to Differential Equations (first week), and I am stuck with the following question:

Let $y(x)$ be a solution of the initial value problem
  $$\begin{cases}y'=\frac{x-y-1}{x-y-2}\\ y(0)=2\end{cases}$$
  Then what is $y(6)$?
Options: a. $-10$, b. $0$, c. $2$, d. $4$, e. $6$, f. $8$.

So far, I have simply integrated $\frac{x-y-1}{x-y-2}$ based on x, and then entered $y(0)=2$ to find $C$. I realize there must be a more elegant trick, but at the same time do not understand why my answer is wrong (it must be wrong, because it does not figure amongst the answers given).
Thank you very much!
 A: Let $$v(x)=x-y(x)$$ then
$$-\frac{dv(x)}{dx}+1=\frac{v(x)-1}{v(x)+2}$$ so we get
$$\int\frac{dv(x)}{dx}(v(x)-2)dx=-\int dx$$
A: Alternative method where we DO NOT find the solution of the Cauchy problem.
The ODE can be written as
$$(x-y-1)+(-x+y+2)y'=0.$$
Now consider the function (the so-called first integral),
$$F(x,y)=\frac{x^2}{2}+\frac{y^2}{2}-xy-x+2y$$
and note that if $y(x)$ is a solution then $x\to F(x,y(x))$ is a constant function:
$$\frac{d(F(x,y(x)))}{dx}=F_x(x,y(x))+F_y(x,y(x)) y'(x)=0.$$
Thus, if $y(0)=2$ then  $F(x,y(x))=F(0,2)=6$ and for $x=6$ we get
$$\frac{36}{2}+\frac{y^2}{2}-6y-6+2y=2.$$
yields that $y=6$ or $y=2$.
Since the denominator $x-y-2$ is not zero along a solution and it is negative at the initial point $(0,2)$,  then it should be negative also at $(6,y(6))$ which implies that $y(6)=6$ (and the value $y=2$ has to be excluded).
A: An equation of the form $M(x,y)\,dx+N(x,y)\,dy=0$ is exact if 
$$\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}.$$
Then solution is given by $\int M\,dx +\int N\,dy=c$ where the repeating terms in $\int N\,dy$ are avoided.
