Note that #0x^3# is a place keeper and has no value. I use this to make formatting easier.
#" "3x^4+0x^3+5x^2+12x+3#
#color(magenta)(+3x^3)(x+3)-> ul(3x^4+9x^3 " "larr" Subtract")#
#" "0color(white)(.)-9x^3+5x^2+12x+3#
#color(magenta)(-9x^2)(x+3)->" " ul(-9x^3-27x^2larr" Subtract")#
#" "0color(white)(.)+32x^2+12x+3#
#color(magenta)(+32x)(x+3)-> " "ul(32x^2+96x larr" Subtract")#
#" "0" "-84x+3#
#color(magenta)(-84)(x+3)->" " ul(-84x-252larr" Subtract")#
#" "color(magenta)(+255larr" Remainder")#
#color(white)(.)#
#color(magenta)(3x^3-9x^2+32x-84+255/(x+3))#