Recall the force applied to a spring and its extension/compression:
F = kΔx
Δx is the change in the spring's length (measured from its original length).
x = 0.7 m
x₀ = 0.4 m
Δx = x-x₀ = 0.7 m - 0.4 m = 0.3 m
F = 23 N
Substitute and solve for k:
23 = k×0.3