First, let’s concentrate on the force exerted by the liquid of density 3ρ on the cylinder in the horizontal direction.
Let the length of the cylinder be L.
Consider a small segment of length rdθ at an angle θ from the horizontal line.
Height of this segment from the topmost point of fluid 3ρ is R sinθ
Hence, the pressure exerted by the fluid will be 3ρgRsinθ
The force exerted in the horizontal direction, dF=3ρgRsinθRLcosθdθ
Similarly, proceeding for the fluid with density 2ρ
Height of any segment, above horizontal =h−R−Rsinθ
below horizontal, h−R+Rsinθ
Thus, horizontal force on the cylinder because of fluid,
For equilibrium, both the forces should be equal, hence solving the above equation,
h = R √3/2