You have atmospheric pressure outside, you have pressure X that's a bit higher in the vessel. Now just find the height difference (h-a) that corresponds to the pressure difference according to the formula you already wrote above.

The given info is where you need to start. At X you have a given static pressure. Then you travel down the U tube to the bottom of dimension A. At that point, for the water you have the combination of the pressure at X and the rho*g*a contribution. That will give you a new static pressure at that point. At the point that coincides with the bottom of dimensions A and H, the pressure has to be equal. So you take your new pressure that you just calculated and set that equal to the rho*g*h for the mercury to calculate h.

The given info is where you need to start. At X you have a given static pressure. Then you travel down the U tube to the bottom of dimension A. At that point, for the water you have the combination of the pressure at X and the rho*g*a contribution. That will give you a new static pressure at that point. At the point that coincides with the bottom of dimensions A and H, the pressure has to be equal. So you take your new pressure that you just calculated and set that equal to the rho*g*h for the mercury to calculate h.

You have atmospheric pressure outside, you have pressure X that's a bit higher in the vessel. Now just find the height difference (h-a) that corresponds to the pressure difference according to the formula you already wrote above.

In order to find the height difference, we need to know both the a and h, and 'h' is what we're expected to calculate.