(N/A) Let the height of the palace be $H$ metres. Let the point of observation be $P$,which is $h$ metres above the water level. Let $O$ be the point on the water level directly below $P$. Let the top of the palace be $T$. The height of $T$ above the water level is $H$. The depth of the image $T'$ of the palace in the lake is $H$ below the water level.
In the right-angled triangle formed by the line of sight to the top,the horizontal distance $x$ satisfies $\tan \alpha = \frac{H-h}{x}$,so $x = \frac{H-h}{\tan \alpha} = (H-h) \cot \alpha$.
In the right-angled triangle formed by the line of sight to the image,the horizontal distance $x$ satisfies $\tan \beta = \frac{H+h}{x}$,so $x = \frac{H+h}{\tan \beta} = (H+h) \cot \beta$.
Equating the two expressions for $x$: $(H-h) \cot \alpha = (H+h) \cot \beta$.
$H \cot \alpha - h \cot \alpha = H \cot \beta + h \cot \beta$.
$H(\cot \alpha - \cot \beta) = h(\cot \alpha + \cot \beta)$.
$H = \frac{h(\cot \alpha + \cot \beta)}{\cot \alpha - \cot \beta} \text{ metres}$.