Answer
a) $1.1\times 10^5\;\rm Pa$
b) $24.4\;\rm cm$
Work Step by Step
a) The piston is stationary which means that the net force exerted on it is zero.
$$\sum F_y=P_{gas}A-P_{air}A-m_{piston}g =0$$
Noting that the gas pressure force affects upward while the air pressure affects downward.
Thus, the gas pressure is given by
$$P_{gas}=\dfrac{P_{air}A+mg}{A}=P_{air} +\dfrac{mg}{A}$$
$$P_{gas}= P_{air} +\dfrac{mg}{\pi r^2}$$
Plugging the known
$$P_{gas}= (100\times 10^3) +\dfrac{(5.1)(9.8)}{\pi (4\times 10^{-2})^2}$$
$$P_{gas}=\color{red}{\bf 1.1 \times 10^5}\;\rm Pa$$
---
b) Since the piston is frictionless, the temperature of the gas is constant. This means that adding extra mass is making the gas undergoes an isothermal compression process.
Thus,
$$P_1V_1=P_2V_2$$
$$P_1Ah_1=P_2Ah_2$$
Hence,
$$h_2=\dfrac{P_1h_1}{P_2}\tag 1$$
We found $P_1$ above in part (a) and now we need to find $P_2$.
Using the same approach;
$$P_{2}= P_{air} +\dfrac{m_{total}g}{\pi r^2}$$
$$P_{2}= P_{air} +\dfrac{(m_{piston}+m_{added})g}{\pi r^2}$$
Plugging the known;
$$P_{2}= (100\times 10^3) +\dfrac{(5.1+3.5)(9.8)}{\pi (4\times 10^{-2})^2}$$
$$P_{2}= 1.17\times 10^5\;\rm Pa$$
Plugging into (1)
$$h_2=\dfrac{(1.1 \times 10^5)(26) }{(1.17\times 10^5)} $$
$$h_2=\color{red}{\bf24.4}\;\rm cm$$