[tex]x^4=x^2\cdot x^2[/tex]. Multiplying the denominator by [tex]x^2[/tex] gives
[tex]x^2(x^2+2x+8)=x^4+2x^3+8x^2[/tex]
Subtracting this from the numerator gives a remainder of
[tex](x^4+x^3+7x^2-6x+8)-(x^4+2x^3+8x^2)=-x^3-x^2-6x+8[/tex]
[tex]-x^3=-x\cdot x^2[/tex]. Multiplying the denominator by [tex]-x[/tex] gives
[tex]-x(x^2+2x+8)=-x^3-2x^2-8x[/tex]
and subtracting this from the previous remainder gives a new remainder of
[tex](-x^3-x^2-6x+8)-(-x^3-2x^2-8x)=x^2+2x+8[/tex]
This last remainder is exactly the same as the denominator, so [tex]x^2+2x+8[/tex] divides through it exactly and leaves us with 1.
What we showed here is that
[tex]\dfrac{x^4+x^3+7x^2-6x+8}{x^2+2x+8}=x^2-\dfrac{x^3+x^2+6x-8}{x^2+2x+8}[/tex]
[tex]=x^2-x+\dfrac{x^2+2x+8}{x^2+2x+8}[/tex]
[tex]=x^2-x+1[/tex]
and this last expression is the quotient.
To verify this solution, we can simply multiply this by the original denominator:
[tex](x^2+2x+8)(x^2-x+1)=x^2(x^2-x+1)+2x(x^2-x+1)+8(x^2-x+1)[/tex]
[tex]=(x^4-x^3+x^2)+(2x^3-2x^2+2x)+(8x^2-8x+8)[/tex]
[tex]=x^4+x^3+7x^2-6x+8[/tex]
which matches the original numerator.