Set up
#color(white)("XXXXX")underline(color(white)("x"x"X"+2"XXXXXXXX"))#
#x^2-1color(white)("x")")"color(white)("x")x^3color(white)("x")+2x^2color(white)("x")-2xcolor(white)("x")+3#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#x^2# goes into #x^3color(white)("XX")x# times
#color(white)("XXXXX")underline(color(white)("x")xcolor(white)("X")color(white)(+2)color(white)("XXXXXXXX"))#
#x^2-1color(white)("x")")"color(white)("x")x^3color(white)("x")+2x^2color(white)("x")-2xcolor(white)("x")+3#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Multiply divisor (#x^2-1#) by #x# and subtract from dividend
#color(white)("XXXXX")underline(color(white)("x")xcolor(white)("X")color(white)(+2)color(white)("XXXXXXXX"))#
#x^2-1color(white)("x")")"color(white)("x")x^3color(white)("x")+2x^2color(white)("x")-2xcolor(white)("x")+3#
#color(white)("XXXXXX")underline(x^3color(white)("XXXXX")-xcolor(white)("XXXX")#
#color(white)("XXXXXXxXXX")2x^2color(white)("xx")-xcolor(white)("x")+3#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Repeating the above process
#x^2# goes into #2x^2color(white)("XXX")+2# times
Multiply (#x^2-1#) by #(+2)# and Subtract
#color(white)("XXXXX")underline(color(white)("x")xcolor(white)("X")+2color(white)("XXXXXXXX"))#
#x^2-1color(white)("x")")"color(white)("x")x^3color(white)("x")+2x^2color(white)("x")-2xcolor(white)("x")+3#
#color(white)("XXXXXX")underline(x^3color(white)("XXXXX")-xcolor(white)("XXXX")#
#color(white)("XXXXXXxXXX")2x^2color(white)("xx")-xcolor(white)("x")+3#
#color(white)("XXXXXXxXXX")underline(2x^2color(white)("XXXXX")-2)#
#color(white)("XXXXXXxXXXXXXX")-xcolor(white)("x")+5#