Mass of the gun M = 4 kg.
Mass of bullet M = 50 g = 50 × 10-3kg.
Initial velocity of the bullet v = 35ms-1
Let recoil velocity of the gun be vms-1
Before firing the bullet both gun and bullet were in rest so total momentum of gun and bullet is zero, After firing
Momentum of bullet = mv,
Momentum of gun = Mv
Total momentum of bullet and gun after firing = mv + Mv
Since there is no external force applied on the system.
So total momentum after firing = total momentum before firing
mv + Mv = 0
Mv = -mv
fi V = \(\frac{mv}{M}= \frac{50\times 10^{-3}\times 35}{4}\) = -0.44 ms-1
Here negative sign shows that there recoil velocity of the gun is in the direction opposite to the velocity of the bullet.