This is all about taking moments. You could consider replacing the
hemisphere and the cone with two point masses at the centres of
mass of these two parts of the rigid body.
For different ranges of values of $h/a$ you have to consider all
possible positions of equilibrium of the body and whether the
positions are stable or unstable.