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.