Artificial intelligent assistant

Hemisphere surmounted by cone We have a rotationally symmetric solid, consisting of a half-ball of radius $R$, surmounted by a right circular cone of height $H$. If the centroid of the solid is in the half-ball part, it will stand stably with the cone up, but if the centroid is in the cone, it will fall over. Determine the maximum value of $H/R$, so that the solid will not fall over. How i'm supposed to solve this problem without knowing the equation of the of cone and hemisphere? I tried to model this situation, but failed to get the correct equation of cone on top of the hemisphere.

A cone of height $H$ and base radius $R$ has volume $\pi R^2 H/3$ and its centre of mass is at height $H/4$ above the base. The half-ball of radius $R$ has volume $2 \pi R^3/3$ and its centre of mass is $3 R/8$ below the base of the cone. So the combined solid's centre of mass is at height $$ \dfrac{\left(\dfrac{\pi R^2 H}{3}\right) \dfrac{H}{4} - \left(\dfrac{2\pi R^3}{3}\right) \dfrac{3R}{8}}{\dfrac{\pi R^2 H}{3} + \dfrac{2\pi R^3}{3}} = \dfrac{H^2 - 3 R^2}{4(H + 2 R)} $$ above the base of the cone. In particular, the maximum $H/R$ value for stability is $\sqrt{3}$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy c9e9d704c439e1dc1a1d3d30682fb762