Let's perform the synthetic division
#color(white)(aaaa)##-2##|##color(white)(aaaa)##1##color(white)(aaaa)##-1##color(white)(aaaaaa)##3##color(white)(aaaaaa)##-4##color(white)(aaaa)##-2#
#color(white)(aaaaaaa)##|##color(white)(aaaa)##color(white)(aaaaa)##-2##color(white)(aaaaaa)##6##color(white)(aaaaa)##-18##color(white)(aaaa)##44#
#color(white)(aaaaaaaaa)###_________________________________________________________##
#color(white)(aaaaaaa)##|##color(white)(aaaa)##1##color(white)(aaaa)##-3##color(white)(aaaaaa)##9##color(white)(aaaaa)##-22##color(white)(aaaa)##color(red)(42)#
The remainder is #42# and the quotient is #=x^3-3x^2+9x-22#
#(x^4-x^3+3x^2-4x-2)/(x+2)=x^3-3x^2+9x-22+42/(x+2)#