The magnitude of the force applied to the spring is equal to (Hook's law)

where k is the constant of the spring and x is the displacement of the spring with respect to its relaxed position.
In the exercise, the force applied is F=300 N while the displacement is x=28 m. Therefore the spring's constant is
