Need-assistance-with-Physics-homework

A block of mass M is traveling on a surface inclined at angleθ. The coefficient of kinetic friction isμk, between block and surface. The velocity of the block is V before colliding with a spring. The spring has a stiffness k. How much is the spring compressed? Please explain how you got your answer.