Here,
Mass of the shell,m=20g=20×10−3kg=0.02kg
Mass of the gun, M=100kg
Speed of the shell, v=80ms−1
Let V be speed of recoil of the gun.
According to law of conservation of linear momentum, 0=mv+MV V=−Mmv =−100kg0.02kg×80ms−1=−1.6×10−2ms−1 =−1.6cms−1
-ve sign shows that gun moves backward as the shell moves forward i.e. the gun recoils.