Work can be worked out (excuse the pun, not intentional) with the formula Work = Force x Distance. Since the spring constant is 420 N/m, we can work out the force. 25cm = 0.25m. Now, because that is 1m/4, we can also divide the force in the spring constant by 4. 420/4 = 105. So now we know that the force was 105N. The distance was 0.25m (between 30cm and 55cm). Put those values into the equation to get Work = 105 x 0.25 = 26.25
Answer: 26.25J
The time has nothing to do with work done. Only with Power.