Given :
Velocity of bullet,
.
Mass of bullet, m = 0.005 kg.
Mass of rifle, M = 5 kg.
To Find :
The recoil velocity of the rifle.
Solution :
Since, their is no external force is acting.
So, momentum of the system will be conserved :
Initial momentum = Final momentum
m(0) + M(0) = m(300) + Mv

Therefore, recoil velocity of the rifle is 0.3 m/s.
Hence, this is the required solution.