Work can be calculated using the following equation:
W = F · Δx
Where:
W = work
F = applied force
Δx = displacement
In this case, the force varies with the position, so we can divide the traveled distance in very small parts and calculate the work done over each part of the trajectory. Then, we have to sum all the works and we will obtain the work done from the initial position (xi) to the final position (xf). This is the same as saying:
W = ∫ F · dx
F = 3.6 N/m³ · x³ - 76 N
W = ∫ (3.6 x³ - 76)dx
W = 0.9 x⁴ - 76x
Evaluating from xi to xf:
W = 0.9 N/m³ (21.9 m)⁴ - 76 N · 21.9 m - 0.9 N/m³(5.41 m)⁴ + 76 N · 5.41 m