The law of conservation of momentum tells us that in closed and isolated systems the sum of all objects momentum stays constant. Exact conservation laws include conservation of energy conservation of linear momentum conservation of angular momentum and conservation of electric chargeThere are also many approximate conservation laws which apply to such quantities. When two bodies in an isolated system collide their total momentum before collision is equal to their total momentum after collision.
M be the mass of the gun and V be the velocity with which it recoils.
In physics a conservation law states that a particular measurable property of an isolated physical system does not change as the system evolves over time. V1 and v2 are the final velocities of the bodies. For a collision occurring between object 1 and object 2 in an isolated system the total momentum of the two objects before the collision is equal to the total momentum of the two objects after the collision. So it is clear that external force on the system is zero hence Fnet 0.