(I assume $a>0$, which is not restrictive.)
This can be treated in a way very similar to $\int\sqrt{a^2-x^2}\,dx$. Set $x=a\sinh t$, so $dx=a\cosh t\,dt$ and
$$
\sqrt{a^2\sinh^2t+a^2}=a\sqrt{\sinh^2t+1}=a\cosh t
$$
Thus you have to compute
$$
\int\cosh^2t\,dt
$$
The fundamental relation is
$$
\cosh^2t-\sinh^2t=1
$$
so
$$
\int\cosh^2t\,dt-\int\sinh^2t\,dt=t\rlap{\qquad(*)}
$$
(I'll omit the constant of integration). But, integrating by parts,
$$
\int\sinh t\sinh t\,dt=\cosh t\sinh t-\int\cosh t\cosh t\,dt
$$
or
$$
\int\sinh^2 t\,dt=\cosh t\sinh t-\int\cosh^2t\,dt
$$
and, replacing in $(*)$ we get
$$
2\int\cosh^2t\,dt=t-\cosh t\sinh t
$$
Now it's just a problem of back substitution: $\sinh t=\frac{x}{a}$ and
$$
\cosh t=\frac{\sqrt{x^2+a^2}}{a}
$$
while, from
$$
a\frac{e^t-e^{-t}}{2}=x
$$
we get
$$
ae^2t-2xe^t-a=0
$$
or
$$
e^t=\frac{x+\sqrt{x^2+a^2}}{a}
$$
and so
$$
t=\log\bigl(x+\sqrt{x^2+a^2}\,\bigr)-\log a
$$