If range is same then, one angle is \(\theta\) and other angle is \((90-\theta)\)
\(\Rightarrow h_1=\frac{u^2 \sin ^2 \theta}{2 g}, h_2=\frac{u^2 \sin ^2(90-\theta)}{2 g}\)
\(h_1=\frac{u^2 \sin ^2 \theta}{2 g}, h_2=\frac{u^2 \cos ^2 \theta}{2 g}\)
So, \(h_1+h_2 \Rightarrow \frac{u^2 \sin ^2 \theta}{2 g}+\frac{u^2 \cos ^2 \theta}{2 g}=\frac{u^2}{2 g}\left(\sin ^2 \theta+\cos ^2 \theta\right)\)
\(h_1+h_2=\frac{u^2}{2 g}\)