I've tried: equating work to force * change in distance $(4 = f(x) * \Delta x$), finding $f(x) = \frac{2}{7}$
Then use hooke'ss law to find the spring's constant: $\frac{2}{7} = k * 14\implies k=\frac{1}{49}$
Thus: Force = $f(x) = \frac {x}{49}$
$\int_{0}^{20} \frac{x}{49}dx = \frac{200}{49}$ which is incorrect.
Can someone tell me what I've done wrong, where my knowledge gap is..?

HINT:
Work done is stored as Potential Energy for any spring constant $k$
Hooke's Law
$$F = k \cdot x $$
Potential energy stored due to varying force
$$ PE=\frac12 F\cdot x $$
Plug in
$$ PE= \frac{k x^2}{2}= \text{Area under (F-x) line}$$