Image charges for a nongrounded spherical shell 
A charge $Q$ is located at a distance $r>R$ from the center of a non-grounded conducting spherical shell with radius $R$ and total charge $q_s$. The field external to the shell can be mimicked by the combination of the image charge plus a second image charge. What is this second charge, and where is it located?

It's problem $3.16$ in Electricity and Magnetism by Purcell.

Purcell argued Since the image charges produce the same external field as the shell, Gauss's law implies that the charge on the actual shell is $-QR/r$, whereas we are told that the charge is $q_s$. We can remedy this by placing another image charge of $q_s+QR/r$ at the center. The total charge on the actual shell is now $q_s$, as desired. Furthermore, the boundary condition of constant potential on the shell is still satisfied, by symmetry, because the second image charge is located at the center. So by the uniqueness theorem, the field from our
two image charges mimic the (external) field from the shell.

The external field is the same as produced by the charge $Q$ and $q=-QR/r$ for the grounded shell. I don't understand How gauss law implies the charge on the shell to be $-QR/r$? There wasn't any net charge on the shell initially. I also don't get how the boundary conditions are satisfied in the two problem?
 A: This configuration is just the superposition of two known configurations:

*

*The grounded shell and the real charge $Q$ at $r$


*A second image charge
By the method of images, the first one can be changed into a real charge $Q$ at $r$ and image charge $-QR/r$ inside the shell. Remember that a conductor is an equipotential surface. The first configuration (the grounded case) already produces a uniform potential of zero at all points on the shell. Therefore, the only point the second image charge can be placed without making the shell potential non-uniform is at the center of the shell.
The next question is to find the magnitude of this second image charge. Consider a spherical Gaussian surface enclosing the shell but not the real charge $Q$. This surface encloses a total real charge of $q_s$. Since the two image charges are enclosed inside, their sum must equal this real charge. As such, the second image charge must be the difference between $q_s$ and the first image charge $-QR/r$, so we get that it is $$q_s - (-\frac{QR}{r}) = q_s + \frac{QR}{r}$$

There wasn't any net charge on the shell initially.

The net charge on the shell is defined to be $q_s$. No matter how it is distributed across the shell, it cannot change as the shell is not connected to anything else (isolated). Compare this to the grounded case, where the amount of charge that flows between the ground and shell is exactly correct such that it makes the potential on the shell zero.
