Answer
See the detailed answer below.
Work Step by Step
a) Since the piston is at rest, the net force exerted on it is zero.
$$\sum F_x=F_{\rm gas}-F_{\rm spring}=Ma_x=M(0)=0$$
Thus,
$$F_{\rm gas}=F_{\rm spring}$$
The force exerted by the spring is given by $kx=k\Delta L$, and the force exerted by the gas is given by $P_0A$.
Thus,
$$P_0A=k\Delta L$$
Hence,
$$\boxed{\Delta L=\dfrac{P_0A}{k}}$$
____________________________________________________________
b) The net force exerted on the position is given by
$$\sum F_x=F_{\rm gas}-F_{\rm spring} $$
Thus,
$$\sum F_x= P_1A-k(\Delta L+x)\tag 1 $$
Since the gas temperature is constant, the gas undergoes an isothermal process.
Thus,
$$P_1V_1=P_0V_0$$
Solving for $P_1$;
$$P_1=\dfrac{P_0V_0}{V_1}$$
We know that $V_0=AL_0$, so that $V_1=A(L_0+x)$.
$$P_1=\dfrac{P_0\color{red}{\bf\not} AL_0}{\color{red}{\bf\not} A(L_0+x)}$$
$$P_1=\dfrac{P_0L_0}{L_0+x}\tag 2$$
Plugging into (1);
$$\sum F_x= \dfrac{P_0L_0 A}{L_0+x}-k(\Delta L+x) $$
Plugging $\Delta L$ from the boxed formula above in part (a);
$$\sum F_x= \dfrac{P_0L_0 A}{L_0+x}-k\left(\dfrac{P_0A}{k}+x\right) $$
$$\sum F_x= \dfrac{P_0L_0 A}{L_0+x}- P_0A -kx $$
$$\sum F_x= \dfrac{P_0\color{red}{\bf\not} L_0 A}{\color{red}{\bf\not} L_0(1+\frac{x}{L_0})}- P_0A -kx $$
$$\sum F_x= P_0A \overbrace{\left(1+\frac{x}{L_0}\right)^{-1}}^{\approx\left[ 1-\frac{x}{L_0}\right]}- P_0A -kx $$
We used here the famous binomial approximation of $\color{blue}{(1+x)^1\approx 1+nx}$ when $x\lt\lt 1$, and in our case here $\frac{x}{L_0}\lt\lt 1$
since $x\lt \lt L_0$.
$$\sum F_x= P_0A \left[ 1-\frac{x}{L_0}\right] - P_0A -kx $$
$$\sum F_x=( P_0A) -\frac{ P_0A x}{L_0} - (P_0A) -kx $$
$$\sum F_x= -\frac{ P_0A x}{L_0} -kx $$
$$\boxed{\sum F_x= -\left(\frac{ P_0A }{L_0} +k\right)x }$$
____________________________________________________________
c) We know that the oscillation period in simple harmonic motion is given by
$$\omega=2\pi f=\dfrac{2\pi }{T}$$
where $f=1/T$
Hence,
$$T=\dfrac{2\pi}{\omega}=2\pi \sqrt{\dfrac{M}{k}}$$
Now in the previous boxed formula, we can see that the term between parentheses $\left(\frac{ P_0A }{L_0} +k\right)$ is constant. It is similar to the spring force formula of $-kx$.
Thus,
$$\boxed{T= 2\pi \sqrt{\dfrac{M}{\frac{ P_0A }{L_0} +k}}}$$