You should remember the equation of simple harmonic motion such that:
`y = A*sin (omega*t)`
Since the problem provides the end positions of the spring, you may evaluate peak-to-peak amplitude such that:
`2A =85 - 41 => A = (85 - 41)/2 => A = 44/2 => A = 22 cm`
The problem provides the period the complete movement is made, hence, the period of time is of 3 seconds.
You should remember the equation that relates the frequency f, the angular frequency omega and the period T such that:
`T = 1/f and f = (omega)/(2pi) => T = 2pi/omega => omega = 2pi/T`
`omega = 2pi/3`
Hence, substituting `2pi/3` for omega in equation of simple harmonic motion yields:
`y = 22*sin ((2pi/3)*t)`
Hence, evaluating the equation that models the simple harmonic motion yields `y = 22*sin ((2pi/3)*t)` .