Edit: eep sorry again mathstud. Please disregeard this post
I think you mean
$\displaystyle \int\frac{x^2-1}{x^2+6x+9}dx$
You have an extra open bracket that you haven't closed at the start of $\displaystyle x^2$ which makes thins confusing.
First we need to reduce the numerator to a degree smaller than the denominator using long division.
Here is an example of how to do it using 2 common notations. you should get
$\displaystyle \int 1+\frac{-6x-10}{x^2+6x+9}dx$
Do you know how to proceed from here?