Notice that in the equality you want to prove:
$$
\int_{-\infty}^{\infty} u(x,\color{red}{t})\,dx = \int_{-\infty}^{\infty}g\, dx,
$$
the left term is a function of the temporal variable while the right term is a real constant assuming that $u(x,0) = g\in L^1(\mathbb{R})$ and is compactly supported as well. If for the moment we assume $u$ is smooth, take the time derivative on the left:
$$
\frac{d}{d\color{red}{t}}\int_{-\infty}^{\infty} u(x,t)\,dx = \int_{-\infty}^{\infty} \frac{\partial}{\partial \color{red}{t}}u(x,t)\,dx,\tag{1}
$$
where we performed the differentiation under the integral sign for $u$ is smooth. The right side of above is:
$$
\int_{-\infty}^{\infty} \frac{\partial}{\partial t}u(x,t)\,dx = -\int_{-\infty}^{\infty} \frac{\partial}{\partial x} F\big(u(x,t)\big)\,dx =- F\big(u(x,t)\big)\Big\vert^{\infty}_{-\infty}=0,
$$
because of $u$ is compactly supported and $F(0) = 0$. Hence
$$
\int_{-\infty}^{\infty} u(x,t)\,dx = \int_{-\infty}^{\infty}u(x,0)\, dx = \int_{-\infty}^{\infty}g\, dx.
$$
This gives you an idea of why this is called conservation law.
Back to the integral solution $u$ of the conservation law (the definition is somewhere earlier in that conservation law chapter of Evans):
$$
\int^{\infty}_0 \int^{\infty}_{-\infty} \Big(u v_t + F(u) v_x\Big)\,dxdt + \int^{\infty}_{-\infty} gv\,dx \big|_{t=0}= 0,\tag{2}
$$
for $v\in C^{\infty}_c(\mathbb{R}\times [0,\infty))$. Now $u$ only lies in $L^{\infty}\cap C_c$ ($u$ may not be differentiable anymore, thinking all those blows up in time, and shock waves in space!), the trick in (1) is not applicable anymore, here the way to prove this is to choose proper test function $v$.
Think $u(x,\tau)$ for any $\tau>0$, and consider the problem when the time starts at $\tau$:
$$
\left\{ \begin{aligned}
u_t + F(u)_x &= 0 &\text{ in } \mathbb{R} \times (\tau,\infty), \\
u&=u(x,\tau) &\text{ at } \mathbb{R} \times \left\{t=\tau\right\} ,
\end{aligned} \right.\tag{$\star$}
$$
The weak solution to $(\star)$ coincides with the original IVP if we assume the solution is unique (but unfortunately this is not true for the integral solution, that's why we solve for an entropy solution by artificially adding a diffusion perturbation, which is the so-called vanishing viscosity method). Then we can see $u$ satisfies:
$$
\int^{\infty}_{\tau} \int^{\infty}_{-\infty} \Big(u v_t + F(u) v_x\Big)\,dxdt + \int^{\infty}_{-\infty} uv\,dx \big|_{t=\tau}= 0,\tag{3}
$$
for $v\in C^{\infty}_c(\mathbb{R}\times [\tau,\infty))$ which can be easily extended to the whole time domain smoothly. The difference between (2) and (3) is
$$
\int^{\tau}_{0} \int^{\infty}_{-\infty} \Big(u \color{blue}{v_t} + F(u) \color{blue}{v_x}\Big)\,dxdt + \int^{\infty}_{-\infty} gv\,dx \big|_{t=0} - \int^{\infty}_{-\infty} uv\,dx \big|_{t=\tau}= 0.\tag{4}
$$
Now you can either argue by (A) the test function makes (2) and (3) together must vanish on $[0,\tau)$, hence the blue terms are gone, or (B) choosing $v = 1$ on a set containing the support of $u$ from $t=0$ to $t=\tau$, and the support of $F(u)$ (notice $F\big(u(x\to \infty,t)\big) = F(0) = 0$, the compactly supportedness of $u$ implies that $F(u)$ is compactly supported), then blue terms are gone as well.
Hence we have by (4): for any $\tau>0$
$$\int^{\infty}_{-\infty} gv \,dx \big|_{t=0} =\int^{\infty}_{-\infty} uv\,dx \big|_{t=\tau}.$$
By the choice of the test function $v$ above in (B), we have
$$\int^{\infty}_{-\infty} g(x) \,dx =\int^{\infty}_{-\infty} u(x,\tau)\,dx.$$
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
$\DeclareMathOperator{\supp}{supp}\def\d{\mathrm{d}}\def\peq{\mathrm{\phantom{=}}{}}$Note that $u_t + u u_x = u_t + \left( \dfrac{u^2}{2} \right)_x = 0$ holds for $x > -\dfrac{t^2}{4}$, and $u = 0$ for $x < -\dfrac{t^2}{4}$. Denote$$ g(x) = u(x, 0) = \begin{cases} -\dfrac{2\sqrt{x}}{\sqrt{3}}; & x > 0\\ 0; & x < 0 \end{cases}. $$
For any test function $v$, suppose $\supp(v) \subseteq \left( -\dfrac{T^2}{4}, \dfrac{T^2}{4} \right) × [0, T)$, then\begin{align*} &\peq \int_0^{+∞} \int_{-∞}^{+∞} uv_t \,\d x\d t = \int_0^T \int_{-\tfrac{T^2}{4}}^{\tfrac{T^2}{4}} uv_t \,\d x\d t = \int_{-\tfrac{T^2}{4}}^{\tfrac{T^2}{4}} \int_0^T uv_t \,\d t\d x\\ &= \int_{-\tfrac{T^2}{4}}^0 \int_{\sqrt{-4x}}^T uv_t \,\d t\d x + \int_0^{\tfrac{T^2}{4}} \int_0^T uv_t \,\d t\d x\\ &= \int_{-\tfrac{T^2}{4}}^0 \left( uv \Biggr|_{t = \sqrt{-4x}}^{t = T} uv_t - \int_{\sqrt{-4x}}^T u_tv \,\d t \right)\d x + \int_0^{\tfrac{T^2}{4}} \left( uv \Biggr|_{t = 0}^{t = T} - \int_0^T u_tv \,\d t \right)\d x\\ &= - \left( \int_{-\tfrac{T^2}{4}}^0 \int_{\sqrt{-4x}}^T u_tv \,\d t\d x + \int_0^{\tfrac{T^2}{4}} \int_0^T u_tv \,\d t\d x \right)\\ &\peq + \int_{-\tfrac{T^2}{4}}^0 uv \Biggr|_{t = \sqrt{-4x}}^{t = T} \,\d x + \int_0^{\tfrac{T^2}{4}} uv \Biggr|_{t = 0}^{t = T} \,\d x\\ &= -\int_{-\tfrac{T^2}{4}}^{\tfrac{T^2}{4}} \int_0^T u_tv \,\d t\d x - \int_{-\tfrac{T^2}{4}}^0 uv \Biggr|_{t = \sqrt{-4x}} \,\d x - \int_0^{\tfrac{T^2}{4}} uv \Biggr|_{t = 0} \,\d x\\ &= -\int_0^T \int_{-\tfrac{T^2}{4}}^{\tfrac{T^2}{4}} u_tv \,\d x\d t + \int_{-\tfrac{T^2}{4}}^0 2\sqrt{-x} · v(x, \sqrt{-4x}) \,\d x - \int_0^{\tfrac{T^2}{4}} g(x) v(x, 0) \,\d x\\ &= -\int_0^T \int_{-\tfrac{T^2}{4}}^{\tfrac{T^2}{4}} u_tv \,\d x\d t + \int_0^T \frac{t^2}{2} · v\left( -\frac{t^2}{4}, t \right) \,\d t - \int_0^{\tfrac{T^2}{4}} g(x) v(x, 0) \,\d x, \end{align*}\begin{align*} &\peq \int_0^{+∞} \int_{-∞}^{+∞} \frac{u^2}{2} · v_x \,\d x\d t = \int_0^T \int_{-\tfrac{T^2}{4}}^{\tfrac{T^2}{4}} \frac{u^2}{2} · v_x \,\d x\d t = \int_0^T \int_{-\tfrac{t^2}{4}}^{\tfrac{T^2}{4}} \frac{u^2}{2} · v_x \,\d x\d t\\ &= \int_0^T \left( \frac{u^2}{2} · v\Biggr|_{x = -\tfrac{t^2}{4}}^{x = \tfrac{T^2}{4}} - \int_{-\tfrac{t^2}{4}}^{\tfrac{T^2}{4}} \left( \frac{u^2}{2} \right)_x · v \,\d x \right) \d t\\ &= -\int_0^T \frac{t^2}{2} · v\left( -\frac{t^2}{4}, t \right) \,\d t - \int_0^T \int_{-\tfrac{T^2}{4}}^{\tfrac{T^2}{4}} uu_xv \,\d x\d t, \end{align*}$$ \int_{-∞}^{+∞} g(x) v(x, 0) \,\d x = \int_0^{\tfrac{T^2}{4}} g(x) v(x, 0) \,\d x, $$ thus\begin{align*} &\peq \int_0^{+∞} \int_{-∞}^{+∞} \left( uv_t + \frac{u^2}{2} · v_x \right) \,\d x\d t + \int_{-∞}^{+∞} g(x) v(x, 0) \,\d x\\ &= -\int_0^T \int_{-\tfrac{T^2}{4}}^{\tfrac{T^2}{4}} u_tv \,\d x\d t - \int_0^T \int_{-\tfrac{T^2}{4}}^{\tfrac{T^2}{4}} uu_xv \,\d x\d t\\ &= -\int_0^T \int_{-\tfrac{T^2}{4}}^{\tfrac{T^2}{4}} (u_t + uu_x) v \,\d x\d t = 0. \end{align*} Therefore, $u(x, t)$ is a weak solution.
Finally, since $u(x, t)$ is decreasing with respect to $x$, then$$ u(x + z, t) - u(x, t) \leqslant 0 \leqslant \left( 1 + \frac{1}{t} \right) z. \quad \forall x \in \mathbb{R},\ z > 0,\ t > 0 $$