I have a homework problem from the conservation of momentum chapter that I can't for the life of me figure out how to solve. The question goes like this: A 5.00 gram bullet moving with an initial speed of 400 m/s is fired into and passes through a 1.00 Kg block. The block, initially at rest on a horizontal frictionless surface, is connected to a spring with force constant 900 N/m. The block moves 5.00 cm to the right after impact. Find (a) the speed at which the bullet emerges from the block and (b) the mechanical energy converted into internal energy in the collision. Can anyone tell me how to set this problem up?