Answer
See a detailed answer below.
Work Step by Step
The cylinder is in static equilibrium, so the net force exerted on it is zero.
$$\sum F_y=F_{B1}+F_{B2}-mg=ma_y=m(0)=0$$
where $F_{B1}$ is the buoyant force exerted by the upper liquid and $F_{B2}$ is the buoyant force exerted by the second liquid, as we see in the figure below.
$$F_{B1}+F_{B2}=mg $$
where $m$ is given by the density law $m=\rho V=\rho A l$
$$F_{B1}+F_{B2}=\rho A lg\tag 1 $$
Recall that the buoyant force is given by Archimedes's principle. which states that the buoyant force equals the weight of the fluid displaced by the object
So, $F_{B1}=m_1g=\rho_1V_1g=\rho_1y_1Ag$ and
$F_{B2}=m_2g=\rho_2V_2 g=\rho_2y_2Ag$
Plugging into (1);
$$\rho_1y_1\color{red}{\bf\not} A\color{red}{\bf\not} g+\rho_2y_2\color{red}{\bf\not} A\color{red}{\bf\not} g=\rho \color{red}{\bf\not} A l\color{red}{\bf\not} g $$
we need to find $y_2/l$, so we need to replace $y_1$ by $y_1=l-y_2$
$$\rho_1 (l-y_2)+\rho_2y_2=\rho l$$
$$\rho_1 l-\rho_1 y_2 +\rho_2y_2=\rho l$$
$$(-\rho_1 +\rho_2)y_2=\rho l-\rho_1 l$$
$$( \rho_2-\rho_1 )y_2=l(\rho -\rho_1 )$$
Therefore,
$$\dfrac{y_2}{l}=\dfrac{\rho -\rho_1}{\rho_2-\rho_1}$$
$$\boxed{ y_2 =\left[\dfrac{\rho -\rho_1}{\rho_2-\rho_1}\right]l}$$