Solution (source code)

= Solution

Let $T=\tau_b\wedge\tau_{-a}$ and $A=\{\tau_b<\tau_{-a}\}$. The <Brownian exit time> $T$ is finite almost surely. Optional stopping of the bounded martingale $B_{t\wedge T}$ gives
$$
\mathbb P(A)=\frac{a}{a+b}.
$$
For $T_n=T\wedge n$, optional stopping of $B_t^2-t$ gives $\mathbb ET_n=\mathbb E[B_{T_n}^2]\leq\max(a^2,b^2)$. Letting $n\to\infty$ by monotone and bounded convergence proves $\mathbb ET=\mathbb E[B_T^2]=ab$.

The third derivative in part b at $\lambda=0$ is the cubic martingale $B_t^3-3tB_t$. Optional stopping at $T_n$ is valid because $T_n$ is bounded. Since $B_{T_n}$ is bounded and $T_n\to T$ in $L^1$, its stopped identity passes to the limit and gives
$$
\mathbb E[B_T^3]=3\mathbb E[TB_T].
$$
Put $x=\mathbb E[T\mathbf1_A]$ and $y=\mathbb E[T\mathbf1_{A^c}]$. Then $x+y=ab$, while
$$
b x-a y
=\frac13\left(b^3\frac a{a+b}-a^3\frac b{a+b}\right)
=\frac{ab(b-a)}3.
$$
Solving gives $x=ab(2a+b)/(3(a+b))$. Dividing by $\mathbb P(A)=a/(a+b)$ proves the <conditional Brownian interval-exit time> formula
$$
\mathbb E[\tau_b\mid\tau_b<\tau_{-a}]
=\frac{b^2+2ab}{3}.
$$