Using Gauss's law, the electric flux \( \phi \) is given by the formula:
\[
\phi = \frac{q}{\epsilon_0}
\]
where:
- \( q \) is the charge inside the closed surface,
- \( \epsilon_0 \) is the permittivity of free space.
Now, if there are multiple charges inside the surface, we sum up the individual charges.
Here, we are given the charges inside the closed surface: \( q \), \( -2q \), and \( 5q \).
So, the total charge \( q_{{total}} \) inside the surface is:
\[
q_{{total}} = q + (-2q) + 5q
\]
\[
q_{{total}} = 4q
\]
Therefore, the electric flux is:
\[
\phi = \frac{q_{{total}}}{\epsilon_0} = \frac{4q}{\epsilon_0}
\]
Thus, the electric flux \( \phi \) through the closed surface is:
\[
\phi = \frac{4q}{\epsilon_0}
\]