Actually it does not say or ask anything about a ratio.
They give you the density of the mercury so you can calculate the actual value of the difference. (6 cm).
But even so, it seems that none of the pairs will work.
Taking the last one, h1=18cm and h2=12cm, for example.
In order to have the 18 cm column in equilibrium, and considering that 16000 Pa is about 12 cm Hg, the pressure p should be negative. Unless I made an error of calculation.
For the first pair, in order to have the 4 cm column in equilibrium with the 12 cm from the bulb, p should be 8 cm Hg.
But in order to have the 2 cm in equilibrium with the 6 cm from the other bulb, p should be 4 cm Hg.
Something is fishy.