The potential energy of a system of three charges $q_1, q_2,$ and $q_3$ located at $r_1, r_2,$ and $r_3$ respectively, is given by:
Equation (2.26) in the NCERT text states, '$U = \frac{1}{4\pi\epsilon_0} \left( \frac{q_1q_2}{r_{12}} + \frac{q_1q_3}{r_{13}} + \frac{q_2q_3}{r_{23}} \right)$'. This formula accounts for the interaction energy between all pairs of charges in the system.