The total circuit length is a round trip so half the circuit length is the distance between the two items (panels, boxes, etc.)
To add to the complexity, there are different rules for wires hung in free air (such as overhead) versus wires in Romex cables or buried or in conduit. And a further calculation, called derating, for several circuits' worth or wires running juxtaposed. The rule of 14 gauge for up to 15 amps and 12 gauge for up to 20 amps is for wires within cables running singly.
The good conscientious technician or serviceperson will carry extra oils and lubricants in case the new pump did not come with oil or the oil was accidentally spilled, so the service call can be completed without an extra visit.