Let's perform the synthetic division
color(white)(aaaa)-3|color(white)(aaaa)1color(white)(aaaaa)2color(white)(aaaaaa)-5color(white)(aaaaa)-6
color(white)(aaaaaaa)|color(white)(aaaa)color(white)(aaaa)-3color(white)(aaaaaaa)3color(white)(aaaaaaa)6
color(white)(aaaaaaaaa)_________________________________________________________##
color(white)(aaaaaaa)|color(white)(aaaa)1color(white)(aaa)-1color(white)(aaaaaa)-2color(white)(aaaaaa)color(red)(0)
The remainder is 0 and the quotient is =x^2-x-2
Therefore,
(x^3+2x^2-5x-6)/(x+3)=(x^2-x-2)
Also,
If f(x)=x^3+2x^2-5x-6
f(-3)=(-3)^3+2(-3)^2-5(-3)-6
=-27+18+15-6
=0