Given that,
Mass of gun M=2kg
Mass of bulletm=20g=0.02kg
Initial velocity of bullet v2=200m/s
Initial velocity of gun v1=0
Now, total initial momentum of gun and bullet
(m1+m2)v=0
Now, total momentum of gun and bullet after firing
m1v1+m2v2=2v1+0.02×200
m1v1+m2v2=2v1+4
0=2v1+4
Now, Law of conservation of linear momentum
Total momentum after firing = total momentum before firing
2v1+4=0
v1=−2m/s
negative sign represent opposite direction of bullet
Hence, the velocity of the gun after firing v1=−2m/s