The ball’s horizontal speed is = u m/s.

The vertical component is equal to zero.

Considering the ball’s vertical downward motion

We obtain by substituting the values.

Horizontal range

Which means

Using conservation of momentum, we can find the gun’s recoil velocity as = -40/100 m/s = -0.4 m/s, which is the inverse of the ball’s speed.