f(x) is a polynomial of degree 4 which is divisible by x^3. So
f(x)+1 is divisible by (x+1)^2 = x^2+2X+1.
Perform the polynomial long division....
ax^2 + (b-2a)x + (3a-2b)
----------------------------------------------
x^2+2x+1 ) ax^4 + bx^3 + 0x^2 + 0x + 1
ax^4 + (2a)x^3 + ax^2
-------------------------------
(b-2a)x^3 - ax^2 + 0x
(b-2a)x^3 + (2b-4a)x^2 + (b-2a)x
---------------------------------------
(3a-2b)x^2 + (2a-b)x + 1
(3a-2b)x^2 + (6a-4b)x + (3a-2b)
---------------------------------
(3b-4a)x + (1-3a+2b)
The remainder has to be zero, so
Solve the pair of equations (I leave that much to you) to find a=3 and b=4.
So the function is
ANSWER: