This is based on the conservation of momentum, according to this the momentum of bullet should be equals to momentum of gun.
Pbullet = Pgun
P= mv [p is momentum]
Mass of bullet is 20 gm= 0.02 kg , velocity= 200m/sec
Mass of gun = 2kg, and let velocity be V
So, 0.02×200 = 2×V
So, V= 2 m/sec
This is the recoil velocity of gun.
Regards