let p (x) = 5x^3+8x^2-7x-6
using factor theorem,
(x+2) is a factor of p (x) only if p (-2) = 0
p (-2) = 5×-2^3+8×-2^2-7×-2-6
= -40+32+14-6
= -40 + 40
= 0
since remainder = 0
therefore (x+2) is a factor of p (x)
Again,
using factor theorem,
(x+1) is a factor of p (x) only if p (-1) = 0
p (-1) = 5×-1^3+8×-1^2-7×-1-6
= -5 + 8 + 7 - 6
= 3 + 1
= 4
since remainder is not equal to 0
therefore (x+1) is not a factor of p (x)