Answer
I will use piston b $ (M_{b}=M)$ in cylinder 2.
Work Step by Step
We know pressure exerted by gas is independent of temperature and it is equal to the external pressure(for frictionless piston).
External pressure is sum of the atmospheric pressure and pressure due to weight of piston.
So pressure exerted by gas on piston of cylinder 1 is given as
$$P_{1}=p_{atmosphere} +\frac{Mg}{A}$$Where M is mass and A is surface area of cylinder.
Similarly pressure exerted by gas on piston of cylinder 2 $$P_{2} = p_{atmosphere} +\frac{M_{b}g}{A}$$where $M_{b}$ is mass and A is surface area of piston.
To have the same presure $P_{1}$ must be equal to$ P_{2}$
$$i.eP_{1}=P_{2}$$$$p_{atmosphere} +\frac{Mg}{A} = p_{atmosphere} +\frac{M_{b}g}{A}$$Which gives $ M= M_{b}$
Hence to have the same pressure in both cylinder i will use piston b in cylinder 2.