It is well known that the general solution to the one-dimensional wave equation $u_{tt}=c^2u_{xx}$ is$^{(*)}$
$$
u(x,t)=F(x-ct)+G(x+ct), \tag{1}
$$
where $F(\cdot)$ and $G(\cdot)$ are functions determined by the initial and boundary conditions. Let's start with the former:
$$
u(x,0)=f(x) \implies F(x)+G(x)=f(x), \tag{2}
$$
\begin{align}
u_t(x,0)=g(x) &\implies -cF'(x)+cG'(x)=g(x) \\
&\implies -F(x)+G(x)=a+\frac{1}{c}\int_0^xg(s)\,ds. \tag{3}
\end{align}
Equations $(2)$ and $(3)$ imply
\begin{align}
F(x)&=\frac{1}{2}\left[f(x)-a-\frac{1}{c}\int_0^xg(s)\,ds\right], \tag{4} \\
G(x)&=\frac{1}{2}\left[f(x)+a+\frac{1}{c}\int_0^xg(s)\,ds\right], \tag{5}
\end{align}
which, when plugged into $(1)$, yield d'Alembert's formula:
$$
u(x,t)=\frac{1}{2}\left[f(x-ct)+f(x+ct)\right]+\frac{1}{2c}\int_{x-ct}^{x+ct}g(s)\,ds. \tag{6}
$$
However, $(6)$ is valid only for $x>ct$, as the argument of $F(\cdot)$ and $G(\cdot)$ in Eqs. $(2)$ and $(3)$, from which $(4)$ and $(5)$ are derived, is assumed to be a positive number. It is also worth to notice that the arbitrary constant $a$ in Eqs. $(4)$ and $(5)$ cancels out when $F(x-ct)$ and $G(x+ct)$ are added together to form $u(x,t)$.
Let's now consider the boundary condition $u_x(0,t)+hu(0,t)=0$. It implies
$$
F'(-ct)+G'(ct)+h[F(-ct)+G(ct)]=0, \tag{7}
$$
or
$$
F'(\xi)+hF(\xi)=-[G'(-\xi)+hG(-\xi)]=:\phi(\xi), \tag{8}
$$
where $\xi\leq 0$. Since $-\xi\geq 0$, we are allowed to use $(5)$ to compute $\phi(\xi)$. Then, solving the differential equation $(8)$, we obtain an expression for $F(\cdot)$ that is valid when its argument is nonpositive:
$$
F(\xi)=e^{-h\xi}\left[b+\int_0^{\xi} e^{hs}\phi(s)\,ds\right]
\qquad(\xi\leq 0). \tag{9}
$$
To determine the constant of integration $b$, we require that $F(x-ct)$ be continuous at $x=ct$:
$$
F(0^+)=F(0^-) \implies \frac{1}{2}[f(0)-a]=b. \tag{10}
$$
Therefore, the solution to the wave equation valid for $0<x<ct$ is given by
\begin{align}
u(x,t)&=e^{-h(x-ct)}\left\{\frac{1}{2}[f(0)-a]+\int_0^{x-ct}e^{hs}\phi(s)\,ds\right\} \\
&\phantom{=}+\frac{1}{2}[f(x+ct)+a]+\frac{1}{2c}\int_0^{x+ct}g(s)\,ds. \tag{11}
\end{align}
As a final remark, we notice that, despite appearances, $(11)$ does not depend on the arbitrary constant $a$. Indeed, it follows from $(8)$ and $(5)$ that $\phi(s)$ has a single term dependent on $a$, of the form $-\frac{1}{2}ha$. Therefore, if we denote by $u_a(x,t)$ the part of $u(x,t)$ that depends on $a$, we have
\begin{align}
u_a(x,t)&=e^{-h(x-ct)}\left[-\frac{a}{2}-\frac{ha}{2}\int_0^{x-ct}e^{hs}\,ds\right]+\frac{a}{2} \\
&=-\frac{a}{2}e^{-h(x-ct)}\left[1+e^{h(x-ct)}-1\right]+\frac{a}{2}=0. \tag{12}
\end{align}
$^{(*)}$ See, for instance, https://en.wikipedia.org/wiki/Wave_equation.hu(0,t)=0