Potential energy of a system of three charges
Let us calculate the potential energy of a system of three charges q1, q2 and q3 located at r1, r2, r3 respectively. To bring q1, q2 first from infinity to r1 and r2 no work is required.

Work done in this step is

The charges q1 and q2 produce a potential, which at any point P is given by

Work done next in bringing q3 from infinity to the point r3 is q3 times V1,2 at r3

The total work done in assembling the charges at the given locations is obtained by adding the work done in different steps[Eq.(2) and Eq.(3)]

The final expression for Work done is independent.