#### Answer

The spring will be compressed a distance of 4.0 cm

#### Work Step by Step

The energy $U_s$ stored in the spring after the block compresses the spring will be equal to the block's initial kinetic energy. We can find an expression for the distance that the spring is compressed;
$U_s = KE$
$\frac{1}{2}kx_0^2=\frac{1}{2}mv^2$
$x_0^2=\frac{mv^2}{k}$
$x_0=\sqrt{\frac{mv^2}{k}}$
We can find the distance $x_2$ that the spring is compressed when the initial speed of the block is $2v$;
$U_s = KE$
$\frac{1}{2}kx_2^2=\frac{1}{2}m(2v)^2$
$x_2^2=\frac{m(2v)^2}{k}$
$x_2=\sqrt{\frac{m(2v)^2}{k}}$
$x_2=2~\sqrt{\frac{mv^2}{k}}$
$x_2 = 2~x_0$
$x_2 = (2)(2.0~cm)$
$x_2 = 4.0~cm$
The spring will be compressed a distance of 4.0 cm.