A 5.00g bullet moving with an initial speed of 400m/s is fired into and passes through a 1.00 kg block. The block, initially at rest on a frictionless horizontal surface, is connected to a spring with a spring constant of 900N/m. If the block moves 5.00 cm to the right after impact, find the speed at which the bullet emerges from the block and the mechanical energy lost in the collision.