Method $(1)$ is correct because it uses the definition of differentiability as the existence of a certain limit and check its existence by checking the existence and agreement of two one-sided limits.
Method $(2)$ works under certain assumptions on $f$ which are most often met. However, it only gives you a sufficient criterion for the differentiability of $f$, not a necessary one. Assume the problematic point is $x_0$ and that the function $f$ is continuous on some interval containing $x_0$ and differentiable on some punctured interval containing $x_0$. Method $(2)$ suggests that if
$$ \lim_{x \to x_0^{-}} f'(x) = \lim_{x \to x_0^{+}} f'(x) $$
then $f$ is differentiable at $x = x_0$ and
$$ f'(x_0) = \lim_{x \to x_0^{-}} f'(x) = \lim_{x \to x_0^{+}} f'(x). $$
This is indeed true. Let $h > 0$ be small enough. Since $f$ is continuous on $[x_0, x_0 + h]$ and differentiable on $(x_0,x_0 + h)$, the mean value theorem implies that
$$ \frac{f(x_0 + h) - f(x_0)}{h} = f'(c_h) $$
for some $c_h \in (x_0, x_0 + h)$. As $h \to 0^{+}$, we see that $c_h \to x_0$ so if the limit $\lim_{x \to x_0^{+}} f'(x)$ exists we have
$$ f'_{+}(x_0) = \lim_{h \to 0^{+}} \frac{f(x_0 + h) - f(x_0)}{h} = \lim_{h \to 0^{+}} f'(c_h) = \lim_{x \to x_0^{+}} f'(x_0). $$
Repeating the same argument for $f'_{-}(x_0)$ we have proved that method $(2)$ works under the assumptions above.
However, it might be that one of the limits $\lim_{x \to x_0^{-}} f'(x), \lim_{x \to x_0^{+}} f'(x)$ fails to exist and yet the function $f$ is differentiable at $x = x_0$. The reason is that method $(2)$ actually checks if $f$ is continuously differentiable at $x = x_0$, not only differentiable! For example, if
$$ f(x) = \begin{cases} x^2 \sin \left( \frac{1}{x} \right) & x \neq 0, \\
0 & x = 0 \end{cases} $$
then $f$ is differentiable at $x = 0$ with $f'(0) = 0$ but
$$ \lim_{x \to 0^{\pm}} f'(x) = \lim_{x \to 0^{\pm}} \left( 2x \sin \left( \frac{1}{x} \right) - \sin \left( \frac{1}{x} \right) \right) $$
do not exist and $f$ is not continuously differentiable at $x = 0$.
What about $g(x) = x+x^2$? $g(0)=0$ and $g^\prime(0) = 1 \neq 0$ so $f$ is continuous at $0$ but not differentiable at that point.
By the way any $g(x) = a_0 + a_1x + a_2x^2 + a_3x^3$ with $a_0= 0, \ a_1 \neq 0$ and $a_0,a_1,a_2,a_3$ non-negative would work.
Best Answer
$g (x)$ is not actually defined at $x=2$ so we can't ask about its continuity or derivative at that $x$ value. For $f (x)$ yes your reasoning is sound.