For the inequality $x^2 - 3 > 0$, we have
\begin{align} x^2 - 3 & = (x+\sqrt 3)(x- \sqrt 3) > 0 \end{align}
Therefore,
\begin{align} x > -\sqrt 3 \end{align}
and
\begin{align} x > \sqrt 3 \end{align}
But, this is clearly wrong as we should get $x < -\sqrt 3$ and $x > \sqrt 3$ as the two intervals. What have I done wrong?
You have $3$ intervals to consider: $(-\infty,-\sqrt3), (-\sqrt3,\sqrt3)$ and $(\sqrt3,\infty)$. The sign of the product $(x-\sqrt3)(x+\sqrt3)$ is constant on each interval. (That's by continuity, since the function $f(x)=x^2-3$ must pass through zero to change sign.)
Use a test point in each interval: \begin{align} (-\infty,-\sqrt3): f(x)&\gt0\\ (-\sqrt3,\sqrt3): f(x)&\lt0\\ (\sqrt3,\infty): f(x)&\gt0\end{align}
So actually you get $x\lt -\sqrt3 \color{blue}{\text{ or }} x\gt\sqrt3 $.