Here it is; one step at a time:
Write in long division form:
#color(white)("XXXX")#
#a-1 )bar(a^3-2a^2+a)#
Leading term of divisor into leading term of dividend
#color(white)("XXXX")color(red)(a^2)#
#color(red)(a)-1 )bar(color(red)(a^3)-2a^2+a)#
Leading term of quotient times complete divisor
#color(white)("XXXX")color(red)(a^2)#
#color(red)(a-1) )bar(a^3-2a^2+a)#
#color(white)("XXXX")underline(color(red)(a^3-a^2)#
Subtract to get progressive dividend/remainder
#color(white)("XXXX")a^2#
#a-1) bar(a^3-2a^2+a)#
#color(white)("XXXX")underline(a^3-a^2)#
#color(white)("XXXXXX")color(red)(-a^2+a)#
Leading term of divisor into leading term of progressive dividend/remainder
#color(white)("XXXX")a^2color(red)(-a)#
#color(red)(a)-1) bar(a^3-2a^2+a)#
#color(white)("XXXX")underline(a^3-a^2)#
#color(white)("XXXXXX")color(red)(-a^2)+a#
Next term of quotient times complete divisor
#color(white)("XXXX")a^2color(red)(-a)#
#color(red)(a-1)) bar(a^3-2a^2+a)#
#color(white)("XXXX")underline(a^3-a^2)#
#color(white)("XXXXXX")-a^2+a#
#color(white)("XXXXXX")underline(color(red)(-a^2+a))#
Subtract to get final remainder
#color(white)("XXXX")a^2-a#
#a-1) bar(a^3-2a^2+a)#
#color(white)("XXXX")underline(a^3-a^2)#
#color(white)("XXXXXX")-a^2+a#
#color(white)("XXXXXX")underline(-a^2+a)#
#color(white)("XXXXXXXXXX")color(red)(0)#