One way to this is through Tanaka's formula:
$$
|W_t-y|=|x-y|+\int_0^t\operatorname{sgn}(W_s-y) dW_s + L^y_t.\qquad\qquad (1)
$$
The stochastic integral is a continuous martingale, call it $M$, with $M_0=0$.
If $x$ and $y$ are of different signs, then no local time at $y$ will accrue before $T_0$, so $u_{T_0}(x,y)=0$ is clear in that case.
In the remaining case, $x$ and $y$ have the same sign; let's say both positive (without loss of generality).
Case 1: $0<y<x$. In this case, no local time accrues until time $T_y$, which time happens strictly before $T_0$. Therefore $u_{T_0}(x,y) = u_{T_0}(y,y)$. One is tempted to now take expectations of both sides of (1), invoking the optional stopping theorem. Some care is needed here. Define $\tau_m:=\inf\{t: |M_t|>m\}$. Then $M_{t\wedge\tau_m}$ is a bounded martingale.
With $t=T_{T_0\wedge T_n\wedge \tau_m}$ in (1), taking expectations we obtain
$$
E^y[|W_{T_0\wedge T_n\wedge\tau_m}-y|]=E^y[L^y_{T_0\wedge T_n\wedge\tau_m}].\qquad\qquad (2)
$$
The process $W$ stopped at time $T_0\wedge T_n$ is bounded, so we can let $m\to\infty$ in (2) to obtain
$$
E^y[|W_{T_0\wedge T_n}-y|]=E^y[L^y_{T_0\wedge T_n}].\qquad\qquad(3)
$$
But it is well known that $P^y[T_0<T_n] = (n-y)/n$, so the left side of (3) can be explicitly evaluated and seen to be equal to
$$
{2y(n-y)\over n}.
$$
Letting $n\to\infty$ in (3), using monotone convergence on the right we see that
$$
2y=u_{T_0}(y,y)
$$
for $y>0$.
Case 2: $0<x<y$. In this case, if $T_0<T_y$ then $L^y_{T_0}=0$. Using the strong Markov property at time $T_y$:
$$
u_{T_0}(x,y) =P^x[T_y<T_0]\cdot u_{T_0}(y,y).
$$
Using the value for $u_{T_0}(y,y)$ found in Case 1, and the known fact that
$$
P^x[T_y<T_0]={x\over y}
$$
you have $u_{T_0}(x,y) = 2x$ in this case.
In short, $u_{T_0}(x,y) = 2(x\wedge y)$ when both $x$ and $y$ are positive.