a polynomial in x of the third degree which will vanish when x=1 and x= -2 and will have the values 4and 28 when x= -1 and x=2 respectively is________.

If f(x) will "vanish" when x = 1 and x = -2

(x-1) and (x+2) must be factors

assume we have
f(x) = a(x+b)(x-1)(x+2)

given:

f(-1) = 4 ---> 4 = a(-1+b)(-2)(1)
-2a(-1+b) = 4
2a - 2ab = 4
a - ab = 2

f(2) = 28 ---> 28 = a(2+b)(1)(4)
4a(2+b) = 28
8a + 4ab = 28
2a + ab = 7

add them:
3a=9
a=3
if a=3 in 2a + ab = 7
6 + 3b=7
3b=1
b=1/3

f(x) = 3(x + 1/3)(x-1)x+2)