Harmonic motion problem involving spring constant explanation