(N/A) Consider two electric charges $q_{1}$ and $q_{2}$ brought from infinity to positions defined by position vectors $\overrightarrow{r_{1}}$ and $\overrightarrow{r_{2}}$ respectively in an external electric field $\overrightarrow{E}$.
The work done in bringing the charge $q_{1}$ from infinity to position $\overrightarrow{r_{1}}$ is:
$W_{1} = q_{1} V(\overrightarrow{r_{1}}) \quad \dots (1)$
Next,the work done in bringing the charge $q_{2}$ from infinity to position $\overrightarrow{r_{2}}$ is done against two fields: the external electric field $\overrightarrow{E}$ and the electric field produced by charge $q_{1}$.
The work done against the external field is:
$W_{2} = q_{2} V(\overrightarrow{r_{2}}) \quad \dots (2)$
The work done against the field produced by $q_{1}$ is:
$W_{3} = \frac{k q_{1} q_{2}}{r_{12}} \quad \dots (3)$
where $r_{12}$ is the distance between $q_{1}$ and $q_{2}$.
The total potential energy $U$ of the system is the sum of the total work done in assembling the configuration:
$U = W_{1} + W_{2} + W_{3}$
$U = q_{1} V(\overrightarrow{r_{1}}) + q_{2} V(\overrightarrow{r_{2}}) + \frac{k q_{1} q_{2}}{r_{12}}$