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