Suppose,
first the charge +q is brought to A, and then the charges –q, +q, and
–q are brought to B, C and D, respectively The total work needed can
be calculated in steps:
(i)
Work needed to bring charge +q to A when no charge is present
elsewhere: this is zero (ii) Work needed to bring –q to B when +q is at A This is given by
(charge at B) × (electrostatic potential at B due to charge +q at A)
= −
× 


 = −
q
q
d
q
d
4
4
0
2
0
π
π
ε
ε
(iii) Work needed to bring charge +q to C when +q is at A and –q is at
B