Using place holders such as #0x^2# which is the same as #0#
#" "x^4+2x^3+3x^2+6x+11#
#" "x-2bar(|" "color(magenta)(x^5+0x^4-x^3+0x^2-x-5))#
#color(brown)(x^4(x-2)->)" "underline(x^5-2x^4)" " larr" Subtract#
#" "0+2x^4-x^3#
#color(brown)(2x^3(x-2))->" "underline(2x^4-4x^3) larr Subtract#
#" "0+3x^3+0x^2#
#color(brown)(3x^2(x-2))->" "underline(3x^3-6x^2) larr Subtract#
#" "0+6x^2-x#
#color(brown)(6x(x-2))->" "underline(6x^2-12x)#
#" "0+11x-5#
#color(brown)(11(x-2))->" "underline(11x-22)#
#color(brown)(" Remainder") ->" "+17 #
# x^4+2x^3+3x^2+6x+11 +17/(x-2)#
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#color(blue)("Check")#
#" "x^4+2x^3+3x^2+6x+11 + 17/(x-2)#
#underline(color(white)(///////////////////////////////////////.)x-2)" "larr "Multiply"#
#x^5+2x^4+3x^2+6x^2+11x#
#underline(0x^5-2x^4-4x^3-6x^2-12x-22+A)" "larr" Add"#
#x^5+" "0-x^3+color(white)(...)0-color(white)(...)x-color(white)(..)22+ A #
Where #A= 17/(x-2)xx(x-2) = 17#
#x^5-x^3-x-22+17" "=" "color(magenta)(x^5-x^3-x-5)-># as required