We expand \(\cos x\) as
\[\begin{equation} \label{e:cos} \cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} + o(x^4), \end{equation}\]
where \(o(x^4)\) is an abbreviation for some function \(f(x) = o(x^4)\) such that \(\lim\limits_{x \to 0} \frac{f(x)}{x^4} = 0\).
Similarly we expand
\[e^y = 1 + \frac{y}{1!} + \frac{y^2}{2!} + o(y^2)\]
and we substitute \(y = -\frac{x^2}{2}\). Then
\[\begin{equation} \label{e:ex2} e^{-x^2/2} = 1 - \frac{x^2}2 + \frac{x^4}{4{\cdot} 2} + o(x^4), \end{equation}\]
assuming here that we can perform arithmetic with the symbol \(o\), i.e. consider that if \(\lim\limits_{y \to 0} \frac{f(y)}{y^2} = 0\), then \(\lim\limits_{x \to 0} \frac14 \cdot \frac{f(-x^2/2)}{(-x^2/2)^2} = 0\), and so \(f(-x^2/2) = o(x^4)\).
Using the equations (1) and (2) we obtain
\[ \lim\limits_{x \to 0} \frac{\cos x - e^{-\frac{x^2}2}}{x^4} = \lim\limits_{x \to 0} \frac{1 - x^2/2 + x^4/24 + o(x^4) - 1 + x^2/2 - x^4/8 - o(x^4)}{x^4} = \]
\[ = \lim\limits_{x \to 0} \frac{x^4/12 + o(x^4) - o(x^4)}{x^4}. \]
Look out: we cannot cancel out the expressions \(o(x^4)\), since each instance may represent a different function. But on the other hand \(o(x^4) - o(x^4) = o(x^4)\) (also \(o(x^4) + o(x^4) = o(x^4)\)); think about why.
So the final limit equals:
\[ \lim\limits_{x \to 0}\frac{\frac1{12}x^4}{x^4} + \lim\limits_{x \to 0}\frac{o(x^4)}{x^4} =\frac{1}{12} + 0 = \frac1{12}. \]