Solution
= Solution
Each visit to $I$ corresponds to two steps, one out of $B$ and one out of $I$. Hence a successful path with $n$ visits contains $2n$ steps. Taking its <expectation> over the <geometric distribution> gives
$$
\boxed{S_{AB}=\sum_{n=1}^{\infty}2n\,q^{n-1}p.}
$$
The last pair is $B\to I\to A$; it contributes two steps just like each previous $B\to I\to B$ excursion.