My solution
Of course, you may apply the derivative rule for the compound function. But I want to give another solution with little computation.
Denote $$u=x+\sqrt{a^2+x^2},$$ $$v=x-\sqrt{a^2+x^2}.$$ Then $$u+v=2x,uv=-a^2.$$ Hence $$u'+v'=2,u'v+uv'=0.$$ We may obtain $$\frac{u'}{u}=\frac{2}{u-v}=\frac{1}{\sqrt{a^2+x^2}}.$$ As a result $$y'=\frac{u'}{u}=\frac{1}{\sqrt{a^2+x^2}}.$$
AM I RIGHT?