Suppose the velocity of the bullet of mass m is v and it strikes the block of mass M. After collision, the linear velocity of the block is V and that of the bullet is v'.
Applying law of conservation of linear momentum, we get
mv=MV+mv′
or 500×0.01=2V+0.01v′
or 5 = 2V + 0.01 v' (i)
Now, the kinetic energy gained by the block 12MV2 raises it to a height h where it gains gravitational potential energy Mgh. By conservation of energy, we get
12MV2=Mgh
or V=√2gh=√2×9.8×0.1=1.4 m/s
Putting the value of V in Eq. (i), we get
5=2×1.4+0.01v′ or v' = 220 m/s