Mass Colliding With a Spring (Fixed Speed)

1. The problem statement, all variables and given/known data

A 2.77 kg mass is sliding across a frictional surface. It then encounters a happy little spring, as shown in the figure. By how much will the mass compress the spring? (The mass is moving at 3 meters per second, and the spring constant is equal 50 N/m)

2. Relevant equations

F = ma
F = kx
F*t = m*v (Possibly?)

3. The attempt at a solution

If the mass was accelerating at 3 m/s^2, the problem would be straightforward. (Just use the acceleration to calculate the force exerted by the mass on the spring, and then divide by the spring constant). But since the mass is moving at a constant speed, you can’t do that.

If the speed is constant, acceleration is 0, but that would imply that the spring doesn’t compress at all once the mass hits it, which obviously makes no logical sense. I don’t think the friction plays any real role (presumably, the mass is traveling at 3 m/s at the instant it hits the spring), and they don’t give the coefficient of friction anyway.

The only thing I can think of is if the momentum were calculated, and then divided by the amount of time it takes to compress the spring. But the time isn’t given either. (Actually, there’s a second part to this question where it asks how long it would take for the spring to compress)