My problem is from Griffiths *Introduction to Electrodynamics, Fourth Edition*, p.112 Problem 2.60 (**not homework**):

> A point charge $q$ is at the center of an uncharged spherical
> conducting shell, of inner radius $a$ and outer radius $b$. Question:
> How much work would it take to move the charge out to infinity
> (through a tiny hole drilled in the shell)? [Answer:
> $(q^2/4\pi\epsilon_0)(1/a)$.]

So we basically need to calculate the total energy of the system (excluding the self-energy of the point charge). I did it, but my result deviated from the answer provided. Below is my solution.

I tried to calculate the energy with the formula

$$W = \frac{1}{2} \sum_{i=1}^n q_i V(\textbf{r}_i),$$

or

$$W = \frac{1}{2} \int \rho V d \tau.$$

Here we have three "objects": the point charge $q$ (I will use subscript $\text{c}$ for it), the inner shell with charge $-q$ uniformly distributed, and the outer shell with charge $q$ uniformly distributed. Taking into account the superposition principle of potentials, we have

$$
\begin{aligned}
V_\text{c} 
&= V_{\text{inner}\to\text{c}} + V_{\text{outer}\to\text{c}} \\
&= \frac{-q}{4\pi\epsilon_0 a} + \frac{q}{4\pi\epsilon_0 b},
\end{aligned}
$$

here the self-action is avoided, and

$$
\begin{aligned}
V_\text{inner} 
&= V_{\text{c}\to\text{inner}} + V_{\text{inner}\to\text{inner}} + V_{\text{outer}\to\text{inner}}\\
&= \frac{q}{4\pi\epsilon_0 a} + \frac{-q}{4\pi\epsilon_0 a} + \frac{q}{4\pi\epsilon_0 b}\\
&= \frac{q}{4\pi\epsilon_0 b},
\end{aligned}
$$

$$
\begin{aligned}
V_\text{outer} 
&= V_{\text{c}\to\text{outer}} + V_{\text{inner}\to\text{outer}} + V_{\text{outer}\to\text{outer}}\\
&= \frac{q}{4\pi\epsilon_0 b} + \frac{-q}{4\pi\epsilon_0 b} + \frac{q}{4\pi\epsilon_0 b}\\
&= \frac{q}{4\pi\epsilon_0 b}.
\end{aligned}
$$

Therefore, the total energy is
$$
\begin{aligned}
W 
&= \frac{1}{2}(q V_\text{c} + (-q) V_\text{inner} + q V_\text{outer})\\
&= \frac{q^2}{8\pi\epsilon_0}\left(\frac{1}{b} - \frac{1}{a}\right).
\end{aligned}
$$

What's wrong with my argument? And what is the right way to do the problem?