Answer
Please see the work below.
Work Step by Step
(a) We can find the required time period as follows:
The spring's upward force is balancing its weight:
$KL=mg$
$\implies \frac{m}{K}=\frac{L}{g}$
Now $T=2\pi \sqrt{\frac{m}{K}}$
$\implies T=2\pi \sqrt{\frac{L}{g}}$
(b) We know that
$T=2\pi \sqrt{\frac{m}{K}}$.....eq(1)
As $F=KL$
$\implies mg=KL$
$\implies K=\frac{mg}{L}$
We plug in this value of $K$ in eq(1) to obtain:
$T=2\pi \sqrt{\frac{m}{\frac{mg}{L}}}$
$T=2\pi \sqrt{\frac{L}{g}}$