The total momentum of the block and putty prior to their collision is
(0.454 kg) (0 m/s) + (5.70 × 10⁻² kg) (8.99 m/s) ≈ 0.512 kg•m/s
and the total momentum after the collision is
(0.454 kg) v + (5.70 × 10⁻² kg) (-8.99 m/s)
where v is the velocity of the block. Momentum is conserved, so
(0.454 kg) v + (5.70 × 10⁻² kg) (-8.99 m/s) = 0.512 kg•m/s
==> v ≈ 2.26 m/s
The total work done on the block by the spring as it gets compressed by a distance x is equal to the change in the block's kinetic energy:
1/2 (25.0 N/m) x ² = 1/2 (0.454 kg) (2.26 m/s) - 0
==> x ≈ 0.202 m ≈ 20.2 cm