The force given here is dependent on the position of the particle. So, we will have to find the work done on the particle for a small displacement and then integrate it to and the network is done by the force over the displacement from x = 0 to x = x
We have, F = cx.
For a small displacement dx the work done on the particle is,