How to apply polynomial long division to $x^3/(x^2+3x+2)$ So I have a basic question. I needed to simplify this expression 
$$\frac{x^{3}}{x^{2} +3x +2}$$
I was to do a polynomial long division in order to simplify it, but I still do not understand how they reached this next expression (I know it can be more simplified)
$$\frac{x^{3}}{x^{2} +3x +2}= x-3 + \frac{7x+6}{x^{2} +3x +2}$$
What was divided by what?
Any help would be appreciated. Thanks in advance!!

$$\frac{x^3}{x^2+3x+2} = \frac{x(x^2+3x+2)-3x^2-2x}{x^2+3x+2} = x - \frac{3(x^2+3x+2)-7x-6}{x^2+3x+2}=x-3+\frac{7x+6}{x^2+3x+2}.$$
