Answer:

Step-by-step explanation:
Gauss's Law says that the electric flux
through a closed surface is directly proportional to the charge
inside it. More precisely,

This means what is outside this closed surface
does not contribute to the flux through it because field lines that go in must come out, resulting a zero flux from an external charge.
In our context, this means the charge
which is outside the sphere will have zero flux through the surface; therefore, Gauss's law will only be concerned with charge
which is inside the sphere; Hence,

Solving for
gives



which is the charge inside the sphere.