Since the question is old, I'll give the complete solution, not just the $x_s$ part.
Before $T_c$
Draw the $xt$ coordinates, with $t$-axis pointing up. From the given $u(x,0)$, we find three families of characteristic lines:
- vertical lines $x=x_0$ with $x_0\le 0$
- slope $1/2$ lines $t=\frac12(x-x_0)$ with $0<x_0<1$
- vertical lines $x=x_0$ with $x_0\ge 1$
There is a gap between the families 1 and 2: it's a triangular region bounded by $x=0$ and $t=\frac12 x$.
This is the rarefaction wave: within this region, all characteristic lines go through $(0,0)$, the origin of the wave.
Therefore, the line through $(x,t)$ has slope $t/x$, which yields
$$
u(x,t)=x/t ,\qquad 0<x< 2t
$$
This is family 4 of characteristics.
The families 2 and 3 appear to overlap. This means they are separated by shock wave, which originates at $x=1$ at time $t=0$ and
moves to the right with velocity $\frac12(2+0)=1$ (the mean of velocities in front and behind the shock, as the jump condition says). Its trajectory is $x=1+t$.
The front edge of rarefaction wave $x=2t$ meets the shock wave $x=1+t$ when $t=1$. Thus, $T_c=1$. The meeting point is $(2,1)$.
After $T_c$
The characteristics of family 2 are no more; the shock is between families 3 and 4. The speed of shock wave as it passes through $(x,t)$ is the mean
of velocities in front and behind the shock:
$$
\frac{1}{2}\left( \frac{x}{t} +0 \right) = \frac{x}{2t}
$$
Therefore, the trajectory of shock wave is described by the ODE
$$
\frac{dx}{dt}=\frac{x}{2t}
$$
Solve this separable ODE with the initial condition $x(1)=2$ to get
$$
x_s(t) = 2 \sqrt{t}
$$
This is the trajectory of shock for $t>1$.
Second method, conservation law
Introduce the quantity $P(t)=\int_{-\infty}^\infty u(x,t)\,dx$. It is actually independent of $t$ because
$$\frac{dP}{dt} = \int_{-\infty}^\infty u_t \,dx = - \int_{-\infty}^\infty (u^2/2) _x \,dx = (u^2/2) \bigg|_{-\infty}^\infty =0$$
Since $P =2$ at $t=0$, it stays at $2$ for all times. At time $t>T_c$ the function $u$ is equal to $x/t$ for $0< x <x_s$, and is zero otherwise. Thus, its integral is
$$
\frac{1}{t} \frac{x_s^2}{2}
$$
Equating the above to $2$, we once again get
$$
x_s(t) = 2 \sqrt{t}
$$
So, let's start looking at the first jump in the initial conditions. Here we left $1$ on the left side and $2$ on the right. As we are looking for an entropy solution and these can only jump down across shocks, we have a rarefaction wave here. At $x=1$ we have a shock (as $2 > 0$) with speed given by Rankine-Hugeniot as $\frac 12 (2+0) = 1$. So for small $t$ we have
$$
u(x,t) = \begin{cases} 1 & x \le t\\ \frac xt & t < x < 2t\\ 2 & 2t \le x < 1+t \\ 0 & x \ge 1+t\end{cases} \quad \quad (0 \le t \le 1)
$$
The next time something interesting happends is when the charateristic with speed 2 starting at 0, hits the shock. That is when $t+1 = 2t$, i. e. $t=1$. Now the shock is built from characteristics of the rarefaction fan, let's denote the shock curve by $s$, we have $s(1) = 2$, and by the jump condition
$$ s'(t) = \frac 12 \cdot \frac{s(t)}t $$
The solution of this ode is $s(t) = 2\sqrt t$, that is we have for the next part
$$
u(x,t) = \begin{cases} 1 & x \le t \\ \frac xt & t < x < 2\sqrt t \\ 0 & x \ge 2\sqrt t \end{cases} \quad\quad (1 \le t \le 4)
$$
Then next interesting time is when the first speed 1 characteristic hits the speed 0 characteristics, that is when $2\sqrt t = t \iff t = 4$ (as $t\ge 0$). After that the shock travels with speed $\frac 12(1+ 0) = \frac 12$, that is we have
$$ u(x,t) = \begin{cases} 1 & x \le 2 +\frac 12t \\ 0 & x> 2 + \frac 12t
\end{cases} \quad \quad (t \ge 4).
$$
Best Answer
The present PDE is the inviscid Burgers' equation. A sketch of the characteristic curves in the $x$-$t$ plane is
Along these curves, $u$ is constant and equal to its value at $t=0$, deduced from the initial data $f(x)$ (similar to a rectangular function).
Therefore, as long as both waves do not interact, the solution is $$ u(x,t) = \left\lbrace \begin{aligned} &0 & &\text{if}\quad x\leq 0\\ &x/t & &\text{if}\quad 0\leq x \leq 2t\\ &2 & &\text{if}\quad 2t\leq x<1+t\\ &0 & &\text{if}\quad 1+t<x \, . \end{aligned} \right. $$ Both waves will interact at some time $t^*$ such that $2t^* = 1+t^*$, i.e. $t^* = 1$. The rarefaction wave catches the shock.