Let's perform the synthetic division
#color(white)(aaaa)##-1##color(white)(aaaaa)##|##color(white)(aaaa)##1##color(white)(aaaaaa)##2##color(white)(aaaaaa)##-5##color(white)(aaaaa)##6#
#color(white)(aaaaaaaaaaaa)#_________
#color(white)(aaaa)##color(white)(aaaaaaa)##|##color(white)(aaaa)##color(white)(aaaaaa)##-1##color(white)(aaaaaa)##-1##color(white)(aaaaa)##6#
#color(white)(aaaaaaaaaaaa)#________
#color(white)(aaaa)##color(white)(aaaaaaa)##|##color(white)(aaaa)##1##color(white)(aaaaaaa)##1##color(white)(aaaaaa)##-6##color(white)(aaaa)##color(red)(12)#
The remainder is #=12# and the quotient is #=x^2+x-6#
#(x^3+2x^2-5x+6)/(x+1)=x^2+x-6+12/(x+1)#