(b) Speed of the bullet relative to ground ${\overrightarrow{v}}_{b} = \overrightarrow{v} + {\overrightarrow{v}}_{r},$ where $v_{r}$ is recoil velocity of gun. Now for gun-bullet system applying the conservation law of momentum, we get
$m{\overrightarrow{v}}_{b} + M{\overrightarrow{v}}_{r} = 0$ or $m\left( \overrightarrow{v} + {\overrightarrow{v}}_{r} \right) + M{\overrightarrow{v}}_{r} = 0$
$\Rightarrow \ \ {\overrightarrow{v}}_{r} = - \frac{m\overrightarrow{v}}{m + M}$ or $v_{r} = \frac{mv}{m + M}$