#### Answer

The speed increases by a factor of 2

#### Work Step by Step

The energy stored in the spring when it is compressed is equal to the kinetic energy of the ball when the ball is released. We can find an expression for the speed $v_0$.
$KE_0 = U_0$
$\frac{1}{2}mv_0^2 = \frac{1}{2}kx_0^2$
$v_0^2 = \frac{kx_0^2}{m}$
$v_0 = \sqrt{\frac{kx_0^2}{m}}$
We can find an expression for the speed $v_2$ after the spring is compressed; $2x_0$
$KE_2 = U_2$
$\frac{1}{2}mv_2^2 = \frac{1}{2}k(2x_0)^2$
$v_2^2 = 4\times ~\frac{kx_0^2}{m}$
$v_2 = 2\times ~\sqrt{\frac{kx_0^2}{m}}$
$v_2 = 2~v_0$
The speed increases by a factor of 2.