As it works well on Socratic use a format which really is the same thing as :
# 6x^2+12x+4" "bar(| 3x^4+2x^2+5x)#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For formatting alignment I include place keepers. For example: #0x^3#
#color(white)("dddddddddddddddddddd")3x^4+0x^3+2x^2+5x+0#
#color(magenta)(1/2x^2)(6x^2+12x+4) ->ul(color(white)("d")3x^4+6x^3+2x^2 larr" Subtract") #
#color(white)("dddddddddddddddddddddd")0 -6x^3+color(white)("d")0x^2+5x+0#
#color(magenta)(-x)(6x^2+12x+4)->color(white)("ddd.dd")ul( -6x^3-12x^2-4x larr" Sub."#
#color(white)("dddddddddddddddddddddddddd")0color(white)("d")+12x^2+9x+0#
#color(magenta)(2)(6x^2+12x+4)->color(white)("dddd")"Subtract"->ul( 12x^2+24x+8)#
#color(white)("ddddddddddddddddddd")color(magenta)("Remainder"->-0-15x-8 )#
#color(magenta)("1/2x^2-x+2 -(15x+8)/(6x^2+12x+4))#