The equation of tangent for hyperbola is
$$y=mx\pm \sqrt {a^2m^2-b^2}$$
$$a^2=ma\pm \sqrt {m^2-4}$$ $$a^4+m^2a^2-2a^3m=m^2-4$$ $$a^4+m^2(a^2-1)-2a^3m+4=0$$
There will be two distinct values of $m$
$$4a^6-4(a^2-1)(a^4+4)>0$$ $$a^6-a^6-4a^2+a^4+4>0$$ $$a^4-4a^2+4>0$$ $$(a^2-2)^2>0$$ $$a^2>2$$ Or $$a^2<2$$
But the given answer for it is $a\in (-\infty, -2)\cup (2,\infty)$
Where have I gone wrong?
Your solution is correct
Let me verify by a separate method
We know two distinct tangents can be drawn for any point $P$ if it lies outside the hyperbola
So, we need $$\dfrac{a^2}1-\dfrac{a^4}4-1<0$$
$$\iff a^4-4a^2+4>0$$
$$\iff(a^2-2)^2>0$$ which is true if $a^2-2\ne0$ and real