A 520 gram block is sliding to the right on a surface that exerts a frictional force with coefficient of kinetic friction μ=0.400. It collides with a horizontal spring with spring constant k=18.0kg/s2 which compresses by 12.0cm as the block comes to rest.
What was the initial speed of the block?