We can derive that the range of a ball is:
The maximum range occurs at 45 degrees (can be shown mathematically)
We are going to assume g=10.
Now to calculate V, we know that he can throw vertically upwards a ball for 40m, lets find the vertical motion of this bal:
The equation above is found by intergrating and finding +C which is V in this case (since it is vertical)
Now at
Maximum height which is 40m is achieved.
So finding the time t when the ball is at maximum height (when thrown vertically upwards)
Sub this into our y equation and sub in y=40
So we found our velocity, plug it into our original x equation: