A spring with a spring constant k is compressed by a length L = F/k when a force F is applied on it.
In your question the student is standing on a spring with a spring constant of 2.5 X 10^3 N/m. The elevator is moving upwards with an acceleration of 3 m/s^2 and the acceleration due to gravity is 9.8 m/s^2 acting downwards. The net acceleration of the student with respect to the spring is (3 + 9.8) = 12.8 m/s^2.
The force applied on the spring is 60*12.8 N
The length it is compressed by can be determined by solving 60*12.8 = 2.5*10^3*L for L
L = 60*12.8/2.5*10^3 = 0.3072
The spring is compressed by 0.3072 m
Think of it this way. Earth’s gravity is 9.8 m/s^2 and is pointing down. The floor of the elevator is accelerating 3 m/s^2 up and according to Newton’s 1st Law of motion the student’s mass tends to remain at rest, therefore the mass is experiencing 9.8 + 3 m/s^2 due to acceleration downward. The sum of which is 12.8 m/s^2. Setting the Force due to the sum equal to Hook’s Law F = kx and solving for x we arrive at the answer. 60 * 12.8 = 2500 *x. As can be seen no consideration is given to the sign, but thinking about it the sum of 12.8 m/s^2 points down. If down is in the negative direction, x must be negative or the spring must be compressed.
The mechanical equilibrium equation is:
T - G = m*a, where G = m*g
T - m*g = m*a
T = m*a + m*g
T = m*(a+g)
T = 60*(3+9.8)
T = 60*12.8
T = 768
Applying Hoolke's law, we'll get T = k*x, where k is the spring constrant = 2.5 * 10^3 N/m and x is the displacement vector
x = 768/2.5 * 10^3
x = 0.3072 m
x = 30.72 cm => x = 31 cm
The spring is compressed by the distance x = 31 cm.