We need to know the relative velocity of the ejected material from the rocket. Using the impulse-momentum theorem we get:
SumF(ext)*(Delta t) = p2(tot) - p1(tot)
where (Delta t) is a small time interval, p2(tot) is the total moment of the rocket at time t + (Delta t) and p1(tot) is the total momentum of the rocket at time t.
Let v denote the velocity of the rocket and V the relative velocity of the ejected fuel. Let (Delta m) represent the mass loss of the rocket over a time (Delta t). Then
SumF(ext)*(Delta t) = (m + (Delta m))(v + (Delta v)) - (mv+ (Delta m)(v + V))
((Delta v) is the change in velocity of the rocket over a time (Delta t).)
SumF(ext)*(Delta t) = m*(Delta v) + (Delta m)(Delta v) - V*(Delta m)
Dividing through by (Delta t) and taking the limit as (Delta t) goes to 0, we get:
SumF(ext) = m*dv/dt - V*dm/dt
Since there are no external forces on the rocket SumF(ext) = 0, so
m*dv/dt = V*dm/dt
We may "cancel" the dt's, so:
m dv = V dm
V is a constant (presumably) so this equation separates:
dv = V*dm/m
Int[dv, 0, v(t)] = Int[V*(1/m) dm, m0, m(t)]
where m0 is the initial mass of the rocket + fuel and m(t) is the mass of the rocket + fuel at time t.
v(t) = V*ln(m0/m(t)) <-- This is a variation on the "rocket equation."
We need to know V.
We know the thrust is a constant F = 4990 N. So:
F = V*dm/dt
(I'm taking magnitudes here, but note that V would typically be in a negative sense, and dm/dt is negative so this works as vectors as well.)
V = F/(dm/dt) = 1919.23 m/s
v(t) = (1919.23)*ln(363/m(t)) m/s
When t = 128 s the rocket is out of fuel and the rocket has attained its maximum speed. The mass at this point is 30 kg, so
v(128) = (1919.23)*ln(363/30) m/s
v(128) = 4785.04 m/s