Solution (source code)

= Solution

Let $J$ count successful journeys before the first breakdown. The probability of surviving the first $r$ journeys is the <tail probability> $\mathbb P(J\geq r)$. For $d\geq0$, <independence> gives
$$
\mathbb P(J\geq2d+1)=q^d(1-\alpha),\qquad
\mathbb P(J\geq2d+2)=q^{d+1},
$$
where again $q=(1-\alpha)(1-\beta)$. For a nonnegative integer-valued <random variable>, the <tail-sum formula> follows by writing $J=\sum_{r\geq1}\mathbf1_{\{J\geq r\}}$ and interchanging nonnegative sums. Therefore
$$
\begin{aligned}
\mathbb E(J)
&=\sum_{d=0}^{\infty}\left(q^d(1-\alpha)+q^{d+1}\right)\\
&=\boxed{\frac{(1-\alpha)+q}{1-q}=\frac{(1-\alpha)(2-\beta)}{\alpha+\beta-\alpha\beta}}.
\end{aligned}
$$
As a separate first-day check using the <law of total expectation>, if $E=\mathbb E(J)$, then $E=\alpha\cdot0+(1-\alpha)\beta\cdot1+q(2+E)$. Solving gives the same finite value. This counts only successful journeys, excluding the failed journey.