(a) Kinetic energy of the block is
$K = \frac{1}{2}mv^{2}$
This kinetic energy is equal to the work done by the block before coming to rest. The work done in compressing the spring through a distance $x\ $from its normal length is
$W = \frac{1}{2}kx^{2}$
$\therefore\ \ \ \ \ \ \ \ \ \ \ \frac{1}{2}mv^{2} = \frac{1}{2}kx^{2}$
$\Longrightarrow \ \ \ \ \ \ \ x = v\sqrt{\frac{m}{k}}$
Given,$v = 4m/s,m = 16kg,k = 100\ N/m$
$\therefore x = 4 \times \sqrt{\frac{16}{100} = 1.6\ m}$