(A) 40 J
Step-by-step explanation:
The initial potential energy stored in the spring is:

this energy is stored in the spring when the spring is compressed by a certain amount
, such that the elastic potential energy of the spring is

where k is the spring constant. On the contrary, when it is at rest, the kinetic energy of the stone is zero:

because the speed is zero (v=0).
When the spring is released, the spring returns to its equilibrium position, so that

and

so the elastic potential energy becomes zero: so the total energy must be conserved, this means that all the potential energy has been converted into kinetic energy of the spring, so 40 J.
(B) 40 J
When the stone starts its motion, its kinetic energy is 40 J:
K = 40 J
While its gravitational potential energy is zero:
U = mgh = 0
where m is the mass of the stone, g is the gravitational acceleration, and h=0 is the height when the stone is thrown up.
As the stone goes up, its gravitational potential energy increases, since h in the formula increases; this means that the kinetic energy decreases, since the total energy must be constant.
When the stone reaches its maximum height, its speed becomes zero:
v = 0
This means that
K = 0
And so all the kinetic energy has been converted into gravitational potential energy, therefore
U = 40 J
(C) 40.8 m
At the maximum height of the trajectory of the stone, we have that the gravitational potential energy is

where
m = 0.1 kg is the mass of the stone
g = 9.8 m/s^2 is the acceleration due to gravity
h is the maximum height
Solving the formula for h, we find:

(D) The initial compression of the spring must be increased by a factor

Here we want to double the maximum height reached by the stone:
h' = 2h
In order to do that, we must double its gravitational potential energy:
U' = 2U
This means that the initial potential energy stored in the spring must also be doubled, so
U' = 80 J
The elastic potential energy of the spring is

We see that the compression of the spring can be rewritten as

And we see that
is proportional to the square root of the energy: therefore, if the energy has doubled, the compression must increase by a factor
.