For [tex]x\neq a[/tex], we have
[tex]\dfrac{x^2-a^2}{x-a}=\dfrac{(x-a)(x+a)}{x-a}=x+a[/tex]
So for [tex]g(x)[/tex] to be continuous at [tex]x=a[/tex], we require that the limit as [tex]x\to a[/tex] is equal to 4.
[tex]\displaystyle\lim_{x\to a}g(x)=\lim_{x\to a}(x+a)=2a=4\implies a=2[/tex]