How to integrate $\int \sqrt{x^2+a^2}dx$ $a$ is a parameter. I have no idea where to start

Substitue $x=a \sinh t$, so $t=\text{arcsinh} \frac{x}{a} $ $dx=a\cosh t dt$ and $x^2+a^2=a^2(1+\sinh^2t)$. Your integral becomes $$\int|a|\cosh t a\cosh t dt=a|a|\int \cosh^2tdt.$$
Use the identity $\cosh^2t=\frac{1}{2}(1+\cosh2t)$ to get $$\frac{a|a|}{2} \int(1+\cosh2t)dt=\frac{a|a|}{2} \left(t+\frac{\sinh 2t}{2} \right)+C $$
If we go back to $x$, we get: $$\frac{a|a|}{2} \left(\text{arcsinh }\frac{x}{a}+\frac{\sinh2 \text{arcsinh } \frac{x}{a} }{2} \right) .$$
This can be further simplified using the identities $\sinh 2t=2\sinh t \cosh t$ and $\cosh \text{arcsinh t}=\sqrt{1+t^2}$
