Answer
$93.2\;\rm m$
Work Step by Step
First, we need to find the spring constant by using the first given data.
The force exerted on the pan is given by
$$\sum F_y=F_{sp}-mg=ma_y=m(0)=0$$
where $F_{sp}$ is the spring force acting upward, and $mg$ is the clay's ball weight acting downward since the pan is massless.
Thus,
$$F_{sp}=mg$$
Recalling Hooke's law, $F=-kx$
$$-k(y)=mg$$
where $y=-10$ cm, thus,
$$-k(-y)=mg$$
Hence,
$$k=\dfrac{mg}{y}=\dfrac{0.1\times 9.8}{0.1}=\bf 9.8\;\rm N/m$$
Applying conservation of energy, we choose the system [clay ball+spring-pan+Earth].
$$E_i=E_f$$
$$K_i+U_{gi}+U_{si}=K_f+U_{gf}+U_{sf}$$
where the initial kinetic energy and the final kinetic energy of the ball are zeros, the initial elastic potential energy of the spring is zero, and the final kinetic energy of the ball is zero since it finally stops when the spring is stretched to a maximum value.
$$0+U_{gi}+0=0+U_{gf}+U_{sf}$$
We choose the origin point 50 cm below the ceiling where the spring is not stretched or compressed.
$$ mgy_1= mgy_2+\frac{1}{2}ky_2^2$$
where $y_1=50$ cm, and we need to find $y_2$.
Multiply both sides by 2;
$$ 2mgy_1= 2mgy_2+ ky_2^2$$
Plugging the known;
$$ 2\times 0.1\times9.8\times 0.5 =(2\times 0.1\times9.8)y_2+ 9.8y_2^2$$
$$0.98=1.96y_2+ 9.8y_2^2$$
$$ 10y_2^2+ 2y_2-1=0$$
Thus, $y_2=-0.432$ m, or $y_2=0.232$
And since we choose the origin to be at the initial position of the pan before the clay ball hits it, so we have to stick with the negative root and dismiss the other one.
$$y_2=\bf -0.432\;\rm m=-43.2\;\rm cm$$
Therefore, the pan's distance from the ceiling is given by
$$\Delta y_{pan}=y_1+|y_2|=50+|-43.2|=\color{red}{\bf 93.2}\;\rm cm$$