For the equation $u_{tt} = c^{2} u_{xx} + a$ with the conditions
\begin{align}
u(0, t) &= 0 \hspace{10mm} u(L, t) = H \\
u(x,0) &= 0 \hspace{10mm} u_{t}(x,0) = 0
\end{align}
consider a solution of the form $u(x,t) = F(x) G(t) + f(x)$, where $f(x)$ is the steady-state solution, for which
\begin{align}
u_{xx} &= F'' G + f'' \\
u_{tt} &= F G''
\end{align}
and the equation becomes
\begin{align}
F G'' = c^{2} F'' G + f'' + a.
\end{align}
Now, let $0 = c^{2} f'' + a$ in order to obtain the conditions $f(0) = 0$ and $f(L) = H$. The solution to this equation is
\begin{align}
f(x) = - \frac{a x^{2}}{2 c^{2}} + c_{1} x + c_{2}.
\end{align}
The condition $f(0) = 0$ yields $c_{2} = 0$. The condition $f(L) = H$ yields
$c_{1} = H/L + aL/2c^{2}$ for the general form
\begin{align}
f(x) = \frac{H \, x}{L} - \frac{a \, x(x - L)}{2 \, c^{2}}.
\end{align}
The remaining equations are derived from
\begin{align}
\frac{G''}{G} = - \mu^{2} = c^{2} \frac{F''}{F}
\end{align}
and are
\begin{align}
G'' + \mu^{2} G &= 0 \\
c^{2} F'' + \mu^{2} F &= 0
\end{align}
which have solutions
\begin{align}
G(t) &= A_{1} \cos(\mu t) + B_{1} \sin(\mu t) \\
F(x) &= A_{2} \cos\left( \frac{\mu}{c} \, x \right) + B_{2} \sin\left( \frac{\mu}{c} \, x \right)
\end{align}
The boundary conditions for $F$ are $F(0) = 0$, $F(L) = 0$ which yields
\begin{align}
A_{2} &= 0 \\
0 &= B_{2} \sin\left( \frac{\mu}{c} \, L \right)
\end{align}
The value for $\mu$ is obtained from $0 = \sin(\mu L/c)$ and is
\begin{align}
\mu = \frac{n \pi c}{L}
\end{align}
for $n$ and integer.
The conditions for $G$ are $G(0) = 0$, $G_{t}(0) = 0$, as stated in the problem, lead to the results
\begin{align}
A_{1} &= 0 \\
\mu B_{1} &= 0.
\end{align}
This yields the result for $G(t) = 0$ which says the only solution to this equation for these conditions is that of $f(x)$ which is independent of time and not an actual wave form solutions.
Bypassing the conditions provided the general solution of the form
\begin{align}
u(x,t) = \frac{H \, x}{L} - \frac{a \, x(x - L)}{2 \, c^{2}} + \sum_{n=1}^{\infty} \left( A_{n} \cos\left(\frac{n \pi c t}{L} \right) + B_{n} \sin\left( \frac{n \pi c t}{L} \right) \right) \, \sin\left( \frac{n \pi \, x}{L} \right)
\end{align}