As we know that change in the potential energy of the system must be equal to the work done to bring the system of charges
here we know that
also here we have
now we will have
So here work done to bring three charges at the vertices of a triangle is given as