While the piston is at a distance 2L from the top, the hole at the top is sealed. The piston is then released, to a position where it can stay in equilibrium. In this condition, the distance of the piston from the top is
Also condition for equilibrium of the piston is
Mg = (P P)R
Cylinder is thermally conducting, the temperature remains the same.
Tagged Ideal gas equation and gas laws. Machine-assigned, so read it as a strong shortlist rather than a verdict.