Answer
a) $-2Q/\epsilon_0$
b) $2Q/\epsilon_0$
Work Step by Step
$$\color{blue}{\bf [a]}$$
When the sphere of radius $R=2a$ is centered at the origin, the two charges $q_1$ and $q_2$, which are at $x=-a$ and at $x= a$ respectively, will be inside the sphere.
Thus, the net electric flux through this sphere is given by
$$\Phi_e=\dfrac{Q_{in}}{\epsilon_0}=\dfrac{q_1+q_2}{\epsilon_0}$$
Plugging the known;
$$\Phi_e =\dfrac{-4Q+2Q}{\epsilon_0}$$
$$\boxed{\Phi_e =\dfrac{- 2Q}{\epsilon_0}}$$
$$\color{blue}{\bf [b]}$$
When the sphere of radius $R=2a$ is centered at $x=2a$, the charge $q_2$, which is at $x= a$, will be the only charge inside the sphere.
Thus, the net electric flux through this sphere is given by
$$\Phi_e=\dfrac{Q_{in}}{\epsilon_0}=\dfrac{ q_2}{\epsilon_0}$$
Plugging the known;
$$\Phi_e =\dfrac{ 2Q}{\epsilon_0}$$
$$\boxed{\Phi_e =\dfrac{ 2Q}{\epsilon_0}}$$