<s>[INST] Find $\int\frac{x-1}{x^2-5x+6}dx$. Why my solution is different from book? I'm learning single variable calculus right now. Right now trying to understand integration with partial fraction. I'm confused in a problem from sometime. I think I'm doing right but answer in my book is something else. 
Please have a look at the images. 


The Solution given in my Book  
I know there's is a difference in finding value of A and B. But in previous exercise I was applying the same method and was getting correct answer. Please help. thankyou in advance. 
 [/INST] HINT: we get $$\frac{x^2+1}{x^2-5x+6}=1+\frac{5x-5}{x^2-5x+6}$$
can you show this?
now we calculate the zeros of $x^2-5x+6$, these are:$$x_{1,2}=\frac{5}{2}\pm\sqrt{\frac{25}{4}-\frac{24}{4}}$$ thus we get $$x_1=3$$ or $$x_2=2$$
and we get $$x^2-5x+6=(x-2)(x-3)$$ and we can make the ansatz:
$$\frac{5x-5}{x^2-5x+6}=\frac{A}{x-2}+\frac{B}{x-3}$$
multiplying by the denominators we obtain:
$$\frac{5x-5}{x^2-5x+6}=\frac{A(x-3]+B(x-2)}{x^2-5x+6}$$
and we get $$5x-5=x(A+B)-3A-2B$$
from here you will get $$5=A+B$$ and $$-5=-3A-2B$$ you must solve this system
</s>