Given that $f(x) = 1 - 3/(x+2) + 3/(x+2)$ while $x ≠- 2$, show that $f(x) = (x^2 + x + 1)/(x+2)^2$ What type of problem is this and what are the first step(s) needed to tackle it?


Given that:
  $$f(x) = 1-\frac{3}{x + 2}+\frac{3}{(x  +2)^2}, \quad \text{with }x ≠ -2$$
  Show that:
  $$f(x) = \frac{x^2 + x +1}{(x + 2)^2}$$

It's fairly basic, clearly, but from my attempts so far it appears that finding common denominators doesn't take you from the first form to the second.
Should something be factorised?

No need of factorization, just evaluate the sum
$$1-\frac{3}{x + 2}+\frac{3}{(x  +2)^2}=\frac{(x  +2)^2-3(x  +2)+3}{(x  +2)^2}.$$
What do you obtain after expanding the numerator?
