I think you need to find the velocity at 1000m first. Once you know that you can find the acceleration required to get it to that speed.
First let up be 'positive' and down be 'negative' (this is arbitrary)
a) Let it have velocity 'u' at 1000m. From that point it travels 4000m up with only the acceleration of gravity (-9.8m/s^2) to slow it down. Since its highest point is 5000m, it must have 0 velocity at that point.
So we can use the equation
With

,

and
Solving we get

. But since we know it must be moving up, we have

, i.e. the rocket is moving at 280m/s up. (the negative sign corresponds to when the rocket is falling back down).
b) Before launch, u = 0 m/s, at 1000m we must have v = 280m/s, and it travels 1000m up to this point
.
So we can use

again, and solving for a we get

.
So the acceleration when the engine is on is 39.2m/s^2 up.
When the engine is off, only gravity is affecting the rocket, so the acceleration is 9.8m/s^2 down (or -9.8m/s^2 up).