$$\int \frac{2x + 10}{(x^2 + 5x + 8) ^ 2}dx$$ we can rewrite as: $\int \frac{2x + 5}{(x^2 + 5x + 8) ^ 2}dx$ + $\int \frac{5}{(x^2 + 5x + 8) ^ 2}dx$
first one is easy. What can we do with the second one?
$$\int \frac{2x + 10}{(x^2 + 5x + 8) ^ 2}dx$$ we can rewrite as: $\int \frac{2x + 5}{(x^2 + 5x + 8) ^ 2}dx$ + $\int \frac{5}{(x^2 + 5x + 8) ^ 2}dx$
first one is easy. What can we do with the second one?
On
To see my suggested approach in action, you have $$x+\frac{5}{2}=\frac{\sqrt7}{2}\tan t\implies \mathrm{d}x=\frac{\sqrt7}{2}\sec^2t\,\mathrm{d}t$$ and so $$\int\frac{5}{\left(\left(x+\frac{5}{2}\right)^2+\frac{7}{4}\right)^2}\,\mathrm{d}x=\int\frac{5\sec^2t}{\left(\frac{7}{4}\tan^2t+\frac{7}{4}\right)^2}\,\mathrm{d}t=\frac{40\sqrt7}{49}\int\cos^2t\,\mathrm{d}t$$
Alternatively, you can try a similar hyperbolic substitution: $$x+\frac{5}{2}=\frac{\sqrt7}{2}\sinh u\implies\mathrm{d}x=\frac{\sqrt7}{2}\cosh u\,\mathrm{d}u$$ and the integral becomes $$\int\frac{5\cosh u}{\left(\frac{7}{4}\sinh^2u+\frac{7}{4}\right)^2}\,\mathrm{d}u=\frac{40\sqrt7}{49}\int\mathrm{sech}^3u\,\mathrm{d}u$$
On
I think you will get shorter calculations in this integral if you use Hermite's method, and make the ansatz $$ \int\frac{2x+10}{(x^2+5x+8)^2}\,dx=\frac{Ax+B}{x^2+5x+8}+\int\frac{Cx+D}{x^2+5x+8}\,dx. $$ Differentiating both sides and comparing gives (at least it gave me)
$$A=\frac{10}{7},\ B=\frac{18}{7},\ C=0,\ D=\frac{10}{7}$$
I'm sure you can do the last integral, which will give you an arctan term. I got the final answer
$$\int\frac{2x+10}{(x^2+5x+8)^2}\,dx=\frac{10x+18}{7(x^2+5x+8)}+\frac{20}{7\sqrt{7}}\arctan\Bigl(\frac{2x+5}{\sqrt{7}}\Bigr)+C.$$
Hint: decompose the fraction as follows:
$$\frac{2x+10}{(x^2 + 5x + 8)^2} = \frac{2x + 5}{(x^2 + 5x + 8)^2} + \frac{5}{(x^2 + 5x + 8)^2}$$
This is a smart trick, and you understand the why in a while. Now you're up with:
$$\int\frac{2x+5}{(x^2 + 5x + 8)^2} + \frac{5}{(x^2 + 5x + 8)^2}$$
Now simply use the great substitution for the first integral
$$y = (x^2 + 5x + 8) ~~~~~ \text{d}y = 2x + 5\ \text{d}x$$
Thus the first integral is nothing but
$$\int \frac{\text{d}y}{y^2} = -\frac{1}{y} = -\frac{1}{(x^2 + 5x + 8)}$$
For the second one, is a greta help the comment above about completing the square:
$$(x^2 + 5x + 8)^2 \to \left(\left(x + \frac{5}{2}\right)^2 + \frac{7}{4}\right)^2 $$
And then again substitute
$$z = x + \frac{5}{2} ~~~~~~~ \text{d}z = \text{d}y$$
obtaining
$$5\int\frac{1}{\left(z^2 + \frac{7}{4}\right)^2}\ \text{d}z$$
For this integration you can proceed in several ways. The easiest one is to substitute again with the tangent trick:
$$z = \frac{\sqrt{7}}{2}\tan(k) ~~~~~~~ \text{d}z = \frac{\sqrt{7}}{2}\sec^2(k)\ \text{d}k$$
So:
$$\left(z^2 + \frac{7}{4}\right)^2 = \left(\frac{7\tan^2(k)}{4} + \frac{7}{4}\right)^2 = \frac{49\sec^4(k)}{16} ~~~~~~~ \text{and} ~~~~~~~ k = \arctan\left(\frac{2z}{\sqrt{7}}\right)$$
Finally the second integral results to be
$$\frac{5\sqrt{7}}{2}\int \frac{16\cos^2(k)}{49}\ \text{d}k$$
Since this is a trivial integration in $\cos^2(k)$, I'll leave you the rest of the calculation.
The final result will be:
$$\frac{2\left(10\sqrt{7}(x^2 + 5x + 8)\arctan\left(\frac{2x+5}{\sqrt{7}}\right) + 7(5x+9)\right)}{49(x^2 + 5x + 8)}$$