Maximum rang to which a boy can throw a ball is 40m maximum hight the bal atain

40 = u T

so
T = 40/u

v = Vi - 9.8 t
at top v = 0
t = Vi/9.8 at top. This is at time t = T/2 = 20/u
so
20/u = Vi/9.8
u Vi = 196
now max range at 45 degrees
so
u = Vi
Vi = sqrt 196 = 14 = sqrt(2 g h)
196 = 2 * 9.8 * h
h = 10 meters

why is range max at 45 degrees?
http://www.wired.com/2010/09/maximum-range-in-projectile-motion/