I don't know the answer to this problem, but I have an attempt. It's given that the quotient $f(x)/x^2$ has $5$ as a limit. I cannot apply the quotient rule for limits because I don't know if $\lim f(x)$ exists. What I do know is that $\lim x^2 = 0$, which clearly is a number.
An attempt. So I can multiply both sides of the hypothesis by $\lim x^2 = 0$ getting
$$\begin{align} \lim \frac{f(x)}{x^2} &= 5 \\ \lim \frac{f(x)}{x^2}\lim x^2 &= 5\lim x^2 \\ \lim \frac{f(x)}{x^2}x^2 &= 5\lim x^2 \\ \lim f(x) &= 5\lim x^2 = 0 \end{align}$$
If this is right, then we got the first request. For the second request, instead of multiplying by $\lim x^2$, we can multiply both sides by $\lim x$, which should give us $\lim f(x)/x = 0$.
Reference. This is problem 56 in section 2.3, Stewart's Calculus, 6th edition. It's an even number, so I think there's no solution anywhere --- solution's manual nor at the back of the book.
You're right to be skeptical about multiplying both sides by zero, it leads to problems sometimes because people then divide by zero without noticing.
Here we don't need to do that though: $$\lim_{x\to 0} f(x) = \lim_{x\to 0} \frac{f(x)}{x^2} x^2 = \lim_{x\to 0} \frac{f(x)}{x^2} \lim_{x\to 0} x^2 = 5\cdot 0 = 0,$$
and the second equality is justified because both limits exist (by the assumption of the exercise). If $\lim f_1(x)$ and $\lim f_2(x)$ exist, then $\lim f_1\cdot f_2$ exists and equals the product $\lim f_1(x)\cdot \lim f_2(x)$.
Edit to answer comments
Suppose that for all $x\neq a$ you know that $f_1(x) = f_2(x)$ and, moreover, $\lim_{x\to a} f_2(x) = N$. Then you can conclude that $\lim_{x\to a} f_1(x) = N$. This can be checked with the $\epsilon-\delta$ definition of the limit. You don't even need to know that $f_1(x) = f_2(x)$ is true for all $x\neq a$, just those "close" to $a$. Say for all $x\in (a-0.1, a+0.1)$ except $a$ itself.
In summary we can perform manipulations on the function before taking the limit without caring about what happens at the limit value. In our case, for all $x\neq 0$, $f(x) = \frac{f(x)}{x^2} x^2$ is true. The second of these two functions has a limit at $0$ and we can then say that the first function also has a limit at zero and it equals the limit of the second function.