Problem involving relationship between the restoring force and the displacement for a mass-spring