a) By a factor 4
The spring potential energy is given by

where
U is the potential energy
k is the spring constant
x is the compression of the spring
In this problem, the spring is compressed twice the initial distance, so:

So the new elastic potential energy will be

So, the spring potential energy will quadruple.
b) By a factor 2
When the gun shoots out the ball, the elastic potential energy is then converted into kinetic energy of the ball:

where
m is the mass of the ball
v is its initial speed
Re-arranging the equation we have

We said that the potential energy has increased by a factor 4, so
U' = 4U
So the new speed of the ball will be

So, the speed will double.