Step 1: Understand the condition of static equilibrium.
In a U-shaped tube containing two immiscible liquids, the pressure at the same horizontal level must be equal.
So, at the common horizontal level shown in the figure,
\[
P_A=P_B
\]
Step 2: Write pressure due to liquid columns.
Pressure due to a liquid column is given by
\[
P=\rho gh
\]
For liquid \(A\),
\[
P_A=\rho_A g h_A
\]
For liquid \(B\),
\[
P_B=\rho_B g h_B
\]
Since pressures are equal,
\[
\rho_A g h_A=\rho_B g h_B
\]
Step 3: Use the given density relation.
Given that density of liquid \(A\) is twice the density of liquid \(B\).
Therefore,
\[
\rho_A=2\rho_B
\]
Substituting in
\[
\rho_A g h_A=\rho_B g h_B,
\]
we get
\[
2\rho_B g h_A=\rho_B g h_B
\]
Canceling \(\rho_B g\) from both sides,
\[
2h_A=h_B
\]
Step 4: Find the relation between \(h_A\) and \(h_B\).
From
\[
2h_A=h_B,
\]
we get
\[
h_A=\frac{h_B}{2}
\]
Step 5: Final conclusion.
Hence, the required relation is
\[
\boxed{h_A=\frac{h_B}{2}}
\]