The rocket is shot upwards and reaches a maximum height of 123 m.
Let the initial velocity at which the rocket is shot upwards be equal to v m/s.
The gravitational potential energy of the rocket when it is shot up is equal to 0. The kinetic energy is equal to (1/2)*m*v^2 where m is the mass of the rocket.
At a height of 123 m, the rocket has come to a stop and its kinetic energy is 0. The gravitational potential energy of the rocket is m*9.8*123.
Total energy in a closed system is conserved. This gives:
0 + (1/2)*m*v^2 = m*9.8*123 + 0
=> v^2 = 19.6*123
=> v = 49.09 m/s
The initial velocity of the rocket is 49.09 m/s