(d) For vertically upward motion of a projectile,
$y = (u\ sin\ \alpha)t - \frac{1}{2}gt^{2}$
$or\ \ h = (u\ sin\ \alpha)t - \frac{1}{2}gt^{2}$
$or\ \ gt^{2} - (2u\ sin\alpha)t + 2h = 0$
$\therefore t = \frac{2u\ sin\alpha \pm \sqrt{\left( 4u^{2}\sin^{2}\alpha \right) - 8gh}}{2g}$
If two roots of quadratic Eq.(i) are $t_{1},t_{2}$ then
$\ t_{1} = \frac{2u\ sin\alpha + \sqrt{4u^{2}\sin^{2}\alpha - 8gh}}{2g}$
$t_{2} = \frac{2u\ sin\alpha - \sqrt{4u^{2}\sin^{2}\alpha - 8gh}}{2g}$
If particle crosses the wall at times $t_{1}$ and $t_{2}$ respectively, then time of flight $t$ is
$t = \sqrt{t_{1}t_{2}}$
$or\ t^{2} = t_{1}t_{2}$
$\therefore\ \left( \frac{2u\ sin\alpha}{g} \right)^{2} = \frac{(2u\ sin\alpha)^{2} - \left( 4u^{2}\sin^{2}\alpha - 8gh \right)}{4g^{2}}$
$or\ \frac{4u^{2}\sin^{2}\alpha}{g^{2}} = \frac{8gh}{4g^{2}}$
$or\ 2u^{2}\sin^{2}\alpha = gh\ $
$Given,\ u = \sqrt{2gh}$
$\ \therefore\ \ 2(2gh)\sin^{2}\alpha = gh$
$or\ \ \sin^{2}\alpha = \frac{1}{4}$
$or\ \ sin\alpha = \frac{1}{2}$
$\therefore\ \ \alpha = 30{^\circ}$