No long division needed here, really, since
[tex]\dfrac{x^3+8x^2+6}{x+8}=\dfrac{x^2(x+8)+6}{x+8}=x^2+\dfrac6{x+8}[/tex]
Then the integral is trivial:
[tex]\displaystyle\int\frac{x^3+8x^2+6}{x+8}\,\mathrm dx=\int x^2+\frac6{x+8}\,\mathrm dx=\frac{x^3}3+6\ln|x+8|+C[/tex]