Step 1: List the two energy parts.
The total electrostatic energy is the energy of each charge in the external field plus the mutual interaction energy of the two charges.
Step 2: Find the potential of the external field.
The field is $E(r) = 1.8\times 10^5\,r^{-2}$. Since $E = -\dfrac{dV}{dr}$, integrating gives $V(r) = \dfrac{1.8\times 10^5}{r}$.
Step 3: Evaluate the field potential at the charges.
Both charges sit at $r = 2.7\,cm = 0.027\,m$, so $V = \dfrac{1.8\times 10^5}{0.027} \approx 6.67\times 10^6\,V$. The field-energy term is $q_1 V + q_2 V = (6 - 3)\times 10^{-6}\,V = 3\times 10^{-6}\times 6.67\times 10^6 \approx 20\,J$.
Step 4: Find the mutual interaction energy.
The charges are separated by $5.4\,cm = 0.054\,m$, so $U_{12} = \dfrac{1}{4\pi\varepsilon_0}\dfrac{q_1 q_2}{r_{12}} = 9\times 10^9\times \dfrac{(6\times 10^{-6})(-3\times 10^{-6})}{0.054}$.
Step 5: Compute the interaction term.
The product $q_1 q_2 = -1.8\times 10^{-11}$, times $9\times 10^9$ gives $-0.162$, divided by $0.054$ gives about $-3\,J$.
Step 6: Add and conclude.
Total $U \approx 20 + (-3) = 17\,J$, which is option (2).
\[ \boxed{U \approx 17\,J} \]