The horizontal speed of the ball is same as that of the car, therefore ball as well as car travels equal horizontal distance. U = car speed of car, v = vertical speed of ball
\(v_0=\sqrt{u^2+v^2}\)
\(\theta = tan^{-1}(\frac{u}{v})\)
For a ground-based observer, the ball is a projectile with speed v0 and the angle of projection θ with horizontal in as shown above.