Part (a)
The potential energy of the block due to its height can be given as,
[tex]U=\text{mgh}[/tex]The potential energy due to presence of spring can be expressed as,
[tex]U=\frac{1}{2}kx^2[/tex]Equating both the values,
[tex]\begin{gathered} \text{mgh}=\frac{1}{2}kx^2 \\ x^2=\frac{2mgh}{k} \\ x=\sqrt[]{\frac{2mgh}{k}} \end{gathered}[/tex]Substitute the known values,
[tex]\begin{gathered} x=\sqrt[]{\frac{2(2.90kg)(9.8m/s^2)(0.500\text{ m)}}{(443\text{ N/m)}}(\frac{1\text{ N}}{1kgm/s^2})} \\ \approx0.253\text{ m} \end{gathered}[/tex]Thus, the maximum compression of the spring is 0.253 m.
Part (b)
Since the slide is frictionless, therefore no energy loss happened during the sliding of block. Therefore, the block will rise up to the same initial height which is 0.500 m.