Solution (source code)

= Solution

The mean increment is $\mathbb EX_1=-6/7+2/7=-4/7$, so $M_n=S_n+(4/7)n$ is a <martingale>. Applying the bounded <optional stopping theorem> at $n\wedge T$ gives
$$
\mathbb E S_{n\wedge T}=-\frac47\mathbb E(n\wedge T).
$$
The terminal sums are bounded by the exit-state bounds from (b), while $n\wedge T$ increases to the integrable stopping time $T$. The <dominated convergence theorem> on the left and the <monotone convergence theorem> on the right therefore prove
$$
\boxed{\mathbb E S_T=-\frac47\mathbb ET.}
$$
This is also <Wald's equation> here. In fact, the stopped identity already implies $\mathbb E(n\wedge T)\leq7m/4$ from $S_{n\wedge T}\geq-m$, giving another direct finite-expectation justification.