Answer
$a= 26.15 ms^{-2}$
Work Step by Step
let $a$ be the acceleration of the rocket for $16s$ and $S_1$ be the distance(height) travelled in $16s$. From $16s$ to $20s$ acceleration of the rocket is $-g$ and $S_2$ be the distance travelled in $20s -16s =4s$.
Let $v$ be the velocity after $16s$
Now
$v = u +at = 0 + 16a $
$v =16a$
$S_1 =ut +\frac{1}{2}at^2$
$ S_1 = 0 + 128a $
$S_1= 128a$
$S_2 =vt -\frac{1}{2}gt^2$
$S_2 = 4v- 80$
we have $S_1 + S_2 =5100m$ , therefore
$5100m = 128 a + 4 v -80$
putting value of $v$
$5100 m = 128a +64a -80$
$a= 26.15 ms^{-2}$