I have this function:

$\displaystyle f(x) = x + \frac{3}{x - 1} - \frac{12}{x^2 + 2x - 3}$

We've been asked to show that the above equation can be written like this:

$\displaystyle \frac{x^2 + 3x + 3}{x + 3}$

I just can't seem to get it and i can't figure out why!

Could someone show me how it's done please?

Many thanks.