Figure 2.2 shows some equipotential lines distributed in space. A charged object is moved from point A to point B.
Since electric field is a conservative field, the work done is a state function. Thus, it would depend only on the final and the initial potential values which is same in all cases i.e. 40 Volts (final value) and 20 Volts (initial value).