Getting wrong answer with exact equation with initial condition. Solve the initial value problem $(4y+2t-5)dt+(6y+4t-1)dy=0, y(-1)=2$
This is an exact equation with $M(t,y)=\frac{\partial f}{\partial y}=4y+2t-5$ and $N(t,y)=\frac{\partial f}{\partial t}=6y+4t-1$
Integrating the first one $f = \int 4y+2t-5 dy = 2y^2+2ty-5y+g(t)$
Then differentiating with respect to the opposite variable $\frac{\partial f}{\partial t} = 2y + g'(t)$
But this is equivalent to $N(t, y)$ so $6y+4t-1 = 2y + g'(t)$ rewriting gives $g'(t)=rt-1+4y$ and integrating with respect to $t$ gives $g(t)=2t^2-t+4yt$
The solution to the ODE is $4y^2+6ty-5y+2t^2-t=C$
Applying $y(-1)=2$ gives $4(2)^2+6(-1)(2)-5(2)+2(-1)^2+1=-1$
But the answer key gives $4ty+t^2-5t+3y^2-y=8$
Where did I go wrong? 

Just for your curiosity, there is a another approach to the problem.
Consider the differential equation $$(4y+2t-5)+(6y+4t-1)\frac{dy}{dt}=0$$ and start changing variable $6y+4t-1=z$. This leads to the new differential equation $$z\frac{dz}{dt}=4t+26$$ which is quite simple.
Consider the general case where  $$(ay+bt+c)+(dy+et+f)\frac{dy}{dt}=0$$ and change variable $dy+et+f=z$. The equation becomes $$z\frac{dz}{dt}+(a-e)z+t (b d-a e)+(cd-a f)=0$$ and, clearly, the case where $a=e$ makes the problem very simple.
