The question isn't particularly difficult, but it is a bit tedious.
For simplicity sake, I will call the polynomial f(x) instead of phi(x).
We are given that f(x) is divisible by x^3, meaning it can be expressed in the form f(x) = x^3 ( ax^2 + bx + c )
We are also given that g(x) = f(x) - 1 is divisible by (x-1)^3, so we can say that g(x) = (x-1)^3 (dx^2 + ex + f)
So we have two equations essentially:
Express both (1) and (2) as polynomials of degree 5 by expanding and factorising etc, then equate their coefficients of x^5, x^4, ... , x, then constants.
Then a whole bunch of very basic simultaneous equations will lead you to finding a, b and c, thus finding the polynomial f(x).