This is about the factor and remainder theorem: the remainder when f(x) is divided by (x-a) is just f(a). In this case, you're being told f(2)=1, f(-1)=28. That means that 2^3 - 2.2^2 + 2a + b = 1 and (-1)^3 - 2.(-1)^2 - a + b = 28. This is a pair of simultaneous linear equations in a and b, namely 2a+b=1, b-a=31, with solution a=-10, b=21. Now you're asked about f divided by (x-3), so look at f(3) = 3^3 -2.(3^2) -10.3 + 21 = 0. So the remainder on division by (x-3) is zero, and f is divisible by x-3.