According to Gauss's law, the total charge enclosed by a surface is proportional to the net electric flux through the surface. Mathematically, Gauss's law is expressed as:
\[
\Phi_{\text{total}} = \frac{Q_{\text{enclosed}}}{\varepsilon_0}
\]
Where:
- \( \Phi_{\text{total}} \) is the total electric flux,
- \( Q_{\text{enclosed}} \) is the charge enclosed,
- \( \varepsilon_0 \) is the permittivity of free space.
The total flux is the sum of the inward and outward flux:
\[
\Phi_{\text{total}} = 6 \times 10^{-5} - 3 \times 10^{-5} = 3 \times 10^{-5} \, \text{C}
\]
Thus, the total charge enclosed is:
\[
Q_{\text{enclosed}} = 9 \times 10^{-5} \, \text{C}
\]