Firstly, i imagine you know the spring constant of the spring, if not, you can work it out using simple harmonic motion equations.
Once you know this, you can begin to work out its acceleration as it is in contact with the spring. This can be done by using the eqations:
F=-kl
(where k...