<s>[INST] How do I solve this, first I have to factor $ 2x\over x-1$ + $ 3x +1\over x-1$ - $ 1 + 9x + 2x^2\over x^2-1$? I am doing calculus exercises but I'm in trouble with this
$$\frac{ 2x}{x-1} +  \frac{3x +1}{ x-1} -   \frac{1 + 9x + 2x^2}{x^2-1}$$
the solution is 

$$ 3x\over x+1$$

The only advance that I have done is factor $ x^2-1$ = $( x-1)$ $ (x+1)$.
I do not know how can I factor  $1 + 9x + 2x^2$, can someone please guide me in how to solve this exercise.
 [/INST] The first two terms are already over a common denominator.
First simplify $$\frac {2x}{x-1}+\frac {3x+1}{x-1}-\frac {1+9x+2x^2}{x^2-1}=\frac {5x+1}{x-1}-\frac {1+9x+2x^2}{x^2-1}$$
Then put the first fraction over the same denominator as the second $$\frac {(5x+1)(x+1)}{x^2-1}-\frac {1+9x+2x^2}{x^2-1}=\frac {(5x+1)(x+1)-(1+9x+2x^2)}{x^2-1}$$
Now simplify the numerator
</s>