The velocity is given as
v=√2gh
Let the hole was made at heighthbelow the water level
Then
H−h=12gt2
By using the equation
v=dt
R=v×t
By substituting the time from the above equation we get
R=√2gh×(2(H−h)g)12
On solving the above equation
R=2√h(H−h)
The maximum range can be found by
dRdh=0
Hence the maximum range isH=2h