Okay, so you know that it takes a certain force to move an object on a spring. You can find that using F=-kx.
The only thing that could have exerted this force is the bullet passing through the block. So, to exert this force, there must have been a reaction force on the bullet. The bullet would slow down, deccelerating.
Equate the spring force and the reaction force and see what you get.
Hope that helps! Let me know if you have any problems.