Step 1: Use Gauss's law.
According to Gauss's law, the electric flux through a closed surface is
\[
\phi=\frac{q_{\text{enclosed}}}{\varepsilon_0}
\]
where \(q_{\text{enclosed}}\) is the total charge enclosed by that closed surface.
Step 2: Find the flux through surface \(P_1\).
From the figure, the inner spherical surface \(P_1\) encloses only the charge
\[
\frac{Q}{2}.
\]
Therefore,
\[
\phi_1=\frac{Q/2}{\varepsilon_0}
\]
\[
\phi_1=\frac{Q}{2\varepsilon_0}
\]
Step 3: Find the flux through surface \(P_2\).
The outer spherical surface \(P_2\) encloses both charges:
\[
\frac{Q}{2}
\]
and
\[
4Q.
\]
So the total charge enclosed by \(P_2\) is
\[
q_{\text{enclosed}}=\frac{Q}{2}+4Q
\]
\[
q_{\text{enclosed}}=\frac{Q}{2}+\frac{8Q}{2}
\]
\[
q_{\text{enclosed}}=\frac{9Q}{2}
\]
Therefore,
\[
\phi_2=\frac{9Q/2}{\varepsilon_0}
\]
\[
\phi_2=\frac{9Q}{2\varepsilon_0}
\]
Step 4: Compare \(\phi_1\) and \(\phi_2\).
Since
\[
\phi_1=\frac{Q}{2\varepsilon_0}
\]
and
\[
\phi_2=\frac{9Q}{2\varepsilon_0},
\]
we get
\[
\phi_2=9\phi_1
\]
Step 5: Final conclusion.
Therefore,
\[
\boxed{\phi_2=9\phi_1}
\]