finding an indefinite integral of a fraction (a) Show that $\frac{4-3x}{(x+2)(x^2+1)}$ can be written in the form ${\frac{A}{x+2} + \frac{1-Bx}{x^2+1}}$ and find the constants $A$ and $B$. 
(b) Hence find $\displaystyle\int\frac{4-3x}{(x+2)(x^2+1)}dx$
For (a) I found that $B=2$ and $A=2$
And I am not quite sure how to integrate. I tried to split them into two $\displaystyle\int\frac{2}{x+2
}dx$ and $\displaystyle\int\frac{1-2x}{x^2+1}dx$ but I don't know how to do after. 

Use
$$\int\frac{f'(x)}{f(x)}dx=\ln|f(x)|+C.$$
Note that $$\int\frac{2}{x+2}dx=2\int\frac{(x+2)'}{x+2}dx$$
$$\int\frac{1-2x}{x^2+1}dx=-\int\frac{2x}{x^2+1}dx+\int\frac{1}{x^2+1}dx=-\int\frac{(x^2+1)'}{x^2+1}dx+\int\frac{1}{x^2+1}dx.$$
Here, set $x=\tan\theta$ for $$\int\frac{1}{x^2+1}dx.$$
