As dls mentioned you're lacking an integral on the RHS. With this notice that
$$
\sum_{i,j=1}^n \partial_i(a_{ij} \partial_j u) =\text{div}(a \nabla u),
$$
so that, integrating by parts and using the zero boundary conditions, we get that the RHS is equal to
$$
-\int_{\Omega} \langle \nabla u, a \nabla u \rangle dx \leq 0.
$$
Edit: Notice that you want to prove that if $u(x,0)=0$ for every $x\in \Omega$ and $u(y,t)=0$ for every $y\in \partial \Omega$ and $t>0$ then $u\equiv 0$. So take such an $u$, then your argument gives
$$
\frac{1}{2}\frac{d}{dt} \int_{\Omega} |u|^2 dx = \int_{\Omega} u \text{div}(a\nabla u) dx.
$$
Call $v=a\nabla u$. The divergence theorem, applied to the vector field $uv$, gives
$$
\int_{\Omega}u \text{div}(v)dx= -\int_{\Omega}\langle \nabla u, v \rangle dx + \int_{\partial \Omega}\langle uv,\nu \rangle d \sigma.
$$
Since we have that $u(y,t)=0$ for every $y\in \partial \Omega$ the boundary integral is zero for every $t$. Therefore we have
$$
\frac{1}{2}\frac{d}{dt}\int_{\Omega} |u|^2 dx =- \int_{\Omega} \langle \nabla u,a\nabla u\rangle dx \leq 0.
$$
We have according to D'Alambert's formula
$$\lim_{x\to\pm\infty}u_t(x,t) \to \frac{1}{2}\left( g'(\pm \infty)+g'(\pm\infty)\right) + \frac{1}{2}\left(h(\pm\infty)+h(\pm\infty)\right) = 0$$
by the compact support of $g$ and $h$. Using this, we can pick up where you left off and show that
$$E'(t) = \int_{-\infty}^\infty u_x u_{tx}\:dx + \int_{-\infty}^\infty u_t u_{xx}\:dx = u_xu_t\Bigr|_{-\infty}^\infty -\int_{-\infty}^\infty u_t u_{xx}\:dx+\int_{-\infty}^\infty u_t u_{xx}\:dx = 0 $$
hence $E(t)$ is constant. For the second part, use D'Alembert's formula to get equations for the first partial derivatives:
$$u_t(x,t) = \frac{1}{2}\left( g'(x+t)+g'(x-t)\right) + \frac{1}{2}\left(h(x+t)+h(x-t)\right)$$
$$u_x(x,t) = \frac{1}{2}\left( g'(x+t)-g'(x-t)\right) + \frac{1}{2}\left(h(x+t)-h(x-t)\right)$$
$$\frac{1}{2}\int_{-\infty}^\infty u_t^2 - u_x^2 \:dx = \frac{1}{2}\int_{-\infty}^\infty(g'(x+t)+h(x+t))\cdot(g'(x-t) + h(x-t))\:dx$$
The question, however, does not ask for a limiting behavior of $t$. It implies a discrete switching behavior that happens for some finite $t$.
Taking a look at the integral, notice that if $t > |\operatorname{Supp}(g+h)|$, then for any point $x$ in the domain of integration, one of the terms in the integrand's product will always be $0$
Thus there exists $T = |\operatorname{Supp}(g+h)|$ such that $\forall t > T$:
$$k(t) - p(t) = \frac{1}{2}\int_{-\infty}^\infty u_t^2 - u_x^2 \:dx = 0$$
Physically, the first part demonstrates the conservation of energy, taking $k(t)$ to be kinetic energy and $p(t)$ to be potential energy. The second part demonstrates the principle of least action since the quantity $k(t) - p(t)$ is called the Lagrangian.
Best Answer
You can integrate wrt t, and use fubini theorem :
$$ \int_0^t \frac{d}{dt}E(\tau) d\tau = - \int_0^t \int_{U} u_t u^3 = - \int_{U} \int_0^t u_t u^3 = - \int_U \frac14u^4 - 0 \leq 0 $$