Let's check your proposition. The method of characteristics gives $u = f(x-ut)$ where $f$ denotes the initial data $x\mapsto -x \, \Bbb I_{[a,0]}(x)$, i.e. for small times $$ u(x,t) = \left\lbrace\begin{aligned} &\tfrac{x-a}{t}, && \text{if}\quad a<x<a(1-t),\\ &\tfrac{-x}{1-t},&& \text{if}\quad a(1-t)<x<0,\\ &0, &&\text{elsewhere}. \end{aligned}\right. $$ The characteristic curves which collapse at $(x,t) = (0,1)$ must be stopped there. Beyond $(0,1)$, the position of the shock wave $x_s(t)$ is deduced from the Rankine-Hugoniot condition, with the data $\frac{x_s-a}{t}$ coming from the rarefaction wave on the left, and the null value coming from $x>0$ on the right. Hence, the location of the shock is given by the D'Alembert differential equation $$ \dot x_s (t) = \frac {1}{2}\left (\frac {x_s (t) -a}{t} +0 \right) , $$ with the initial condition $x_s (1)=0$. In other words, $$ x_s (t) = a \left(1 - \sqrt{t}\right) . $$ The entropy weak solution for larger times $t\geq 1$ reads $$ u(x,t) = \left\lbrace\begin{aligned} &\tfrac{x-a}{t}, && \text{if}\quad a<x<a \left(1 - \sqrt{t}\right) ,\\ &0, &&\text{elsewhere}. \end{aligned}\right. $$