I know the answer to the above question, but I have a question on some of the reasoning.
The way I know how to solve it is $$\lim_{x \rightarrow 0}f(x) = \lim_{x \rightarrow 0}\left(f(x)\cdot \frac{x^2}{x^2}\right) = \lim_{x \rightarrow 0}\left(\frac{f(x)}{x^2}\cdot x^2\right) = \left(\lim_{x \rightarrow 0}\frac{f(x)}{x^2}\right)\left(\lim_{x \rightarrow 0}x^2\right) = 5\cdot0 = 0.$$
I saw another solution elsewhere that gets the right answer, but I am unsure if the steps are actually correct. \begin{align*} &\lim_{x \rightarrow 0}\frac{f(x)}{x^2} = 5 \\ \Longrightarrow &\frac{\lim_{x \rightarrow 0}f(x)}{\lim_{x \rightarrow 0}x^2} = 5 \\ \Longrightarrow &\lim_{x \rightarrow 0}f(x) = 5\cdot \lim_{x \rightarrow 0}x^2\\ \Longrightarrow &\lim_{x \rightarrow 0}f(x) = 5\cdot 0 = 0. \end{align*}
My issue is with that first step. I know that $\lim_{x \rightarrow a} \frac{f(x)}{g(x)} = \frac{\lim_{x \rightarrow a}f(x)}{\lim_{x \rightarrow a}g(x)}$, but only when $\lim_{x \rightarrow a}g(x) \neq 0$. Since $\lim_{x \rightarrow 0}x^2 = 0$, wouldn't this invalidate the above work? However, it still got the same answer, so my real question is why did it work and when will it work in general?
EDIT: Does anyone have a nice example for when the logic in the second method doesn't work?
You can not do this since the denominator on the right is $0$.
$$\lim_{x \rightarrow 0}\frac{f(x)}{x^2} = \frac{\lim_{x \rightarrow 0}f(x)}{\lim_{x \rightarrow 0}x^2}$$
But first aproach is perfect.