let m is the mass of bullet, m=0.02Kg
mass of block is M=0.5Kg
velocity of bullet with which it strikes u=300m/s
Bullet comes out with velocity V and velocity of block=v′
h=0.2m
According to work- energy theorem(for the block after the collision):
0−12M×v′2=mgh
Put all the values and we get v′=2m/s
On applying conservation of momentum
mu=Mv′+mv
0.02×300=0.5×2+0.02×v
v=250m/s