In the other problem you wanted to find the time taken for the spring to compress the full 4m. You did this by thinking about the mass and the spring doing simple harmonic motion. You have a formula T = 2 * pi * [tex]\sqrt{\frac{m}{k}}[/tex] which gives the period of the oscillations that the mass would do if it was attached to the spring and left to osscillate. The period is the time taken for the mass to move from the equlibrium position (the position where the spring is neither streched or compressed) to it's maxium displacement in one direction, back through the equilibrium position to the maximum displacement in the other direction and then back to the equilibrium position again. This is one osscillation.
To find the time taken to move from the equilibrium position to the maximum displacement (4 m in this case) you simply realize that this is 1/4 of a complete oscillation and therefore takes 1/4 of the period.
In the second problem you wanted the maximum velocity of the mass and the formula that you were using involved the time period of the system and the amplitude. In this case you could just find the period and sub it right on into your formula for Vmax.
On a more general point, both questions are very similar if you think about them in terms of the conservation of energy. In the first question the kinetic energy of the mass is being changed into elastic potential energy in the spring. In the second the elastic potential energy in the spring is being changed into kinetic energy in the mass. If you get a chance, sit back and ponder how applying the principle of conservation of energy could have been used with these problems.
I hope this is helpful.