In order to do this, you need to use the reltionship for position vs. time for a frictionless spring, x = Acos(2*π*t/T), where we have chosen an amplitude of 10 cm and the period T was measured in the previous step.