Woohoo I solved it. It's not very hard conceptually but I'm so rusty I kept making stupid mistakes.
The key is to express the question:
f(x) is cubic so can be written as f(x) = ax^3 + bx^2 + cx + d
"When divided by (x^2 + x + 1), a cubic polynomial f(x) leaves remainder (2x+3)" means f(x) / (x^2 + x + 1) = g(x) + (2x+3) / (x^2 + x + 1)
"When f(x) is divided by x(x+3), the remainder is 5(x+1)" means f(x) / x(x+3) = h(x) + 5(x + 1) / x(x+3)
Multiplying up gives you: f(x) = g(x)(x^2 + x + 1) + 2x + 3 and f(x) = h(x)(x(x+3)) + 5(x + 1)
Looking at the equations you can see that both h(x) and g(x) must both be linear, which means you can write g(x) = px + r and h(x) = sx + r.
The equations then become:
ax^3 + bx^2 + cx + d = (px + q)(x^2 + x + 1) + 2x + 3
= (rx + s)(x^2 + 3x) + 5x + 5
You then collect up all the terms such that:
ax^3 = px^3 = rx^3
bx^2 = (p + q)x^2 = (3r + s)x^2
cx = (p + q + 2)x = (3s + 5)x
d = (q + 3) = 5
d and q are found trivially. a = p = r, which means you can substitute that into the other equations to remove p and r, which leaves you with a simulataneous equation for a and s. I can help with the rest but I assume if you're doing AS maths that the rest is pretty easy to solve.
This is where someone probably tells me there's a way easier way to solve it. I think I might cry then.