Answer:
(a). The spring compressed is
.
(b). The acceleration is 1.5 g.
Explanation:
Given that,
Acceleration = a
mass = m
spring constant = k
(a). We need to calculate the spring compressed
Using balance equation

....(I)
The spring compressed is
.
(b). If the compression is 2.5 times larger than it is when the mass sits in a still elevator,
The compression is given by

Here, acceleration is zero
So, 
We need to calculate the acceleration
Put the value of x in equation (I)




Hence, (a). The spring compressed is
.
(b). The acceleration is 1.5 g.