The general solution for $u$ is $ u = f(x_0) = f(x-ut)$, now consider the first set of initial data.
When t = 0,
Case1. If $x < -a$, then we have $u = 1$
Case2. If $x > a$, then we have $u = -1$
Case3. If $-a\le x \le a$, then we have $u =- \frac{x}{a}$.
\begin{equation}
u = -\frac{x-ut}{a}\rightarrow u = \frac{x}{t-a}
\end{equation}
Then the solution looks like
\begin{align}
u(x,t)=&\left\{\begin{aligned}
1& && x<-a+t,\\
\frac{x}{t-a}& && -a+t\le x \le a-t,\\
-1& && x>a-t;
\end{aligned}\right.
\\
\end{align}
Thus as t increase, -a+t and a-t runs toward each other, the the solution graph is squeezing. The solution is define for $0<t<a$.