Let the hole be at a height h from the bottom. The height of the water above the hole = H - h. The speed of the water at the hole
$\text{v}=\sqrt{\{2\text{g}(\text{h}-\text{h})\}}$
Let the time taken by the water to strike the floor is t. Then for the vertical fall,
$\text{h}=0\times\text{t}+\frac{1}{2}\text{gt}^2$
$\Rightarrow\text{t}^2=2\text{h}/\text{g}$
$\Rightarrow\text{t}=\sqrt{(2\text{h}/\text{g})}$
Let the distance of the striking point from the hole be X. Then,
$\text{X}=\text{v}\times\text{t}=\sqrt{2\text{g}(\text{H}-\text{h})}\times\sqrt{(2\text{h}/\text{g})}$
$=\sqrt{\{2^2\times(\text{H}-\text{h})\text{h}\}}=2\sqrt{(\text{H}-\text{h})}\text{h}$
$\Rightarrow\text{X}=2\sqrt{(\text{H}-\text{h})}\times\sqrt{\text{h}}$ For maximum $\text{x},\frac{\text{dx}}{\text{dh}}=0$
$2\times\Bigg[\sqrt{(\text{H}-\text{h})}\big]\times\frac{\text{d}\sqrt{\text{h}}}{\text{dh}}+_\sqrt{\text{h}}\times\frac{\text{d}\sqrt{(\text{H}-\text{h})}}{\text{dh}}\Bigg]=0$
$\Rightarrow\sqrt{(\text{H}-\text{h})}\times\Big\{\frac{1}{2\sqrt{\text{h}}}\Big\}+\sqrt{\text{h}}\times\frac{1}{\Big\{2\sqrt{(\text{H}-\text{h})\times(-1)}\Big\}}=0$
$\Rightarrow\sqrt{(\text{H}-\text{h})}\times\Big\{\frac{1}{2\sqrt{\text{h}}}\Big\}+\sqrt{\text{h}}\times\frac{1}{\big\{2\sqrt{(\text{H}-\text{h})}\times(-1)\big\}}=0$
$\Rightarrow\frac{\sqrt{(\text{H}-\text{h})}}{(\sqrt{\text{h}})}=\frac{\sqrt{\text{h}}}{\big\{\sqrt{(\text{H}-\text{h})}\big\}}$
$\Rightarrow\text{H}-\text{h}=\text{h}$
$\Rightarrow2\text{h}=\text{H}$
$\Rightarrow\text{h}=\frac{\text{H}}{2}$
Hence the required height of the hole from the bottom for the greatest horizontal distance of water to strike is half the height of the water level.