When in doubt you can sometimes try to consider easy toy examples. For instance, if you let $f(x) = x -5$ and $g(x) = x - 5$, you have
$\lim_{x \rightarrow 5} \frac{x - 5}{x - 5} = 1$
so in this case the limit does indeed exist. Now if instead you have $f(x) = x- 5$ but $g(x) = (x - 5)^2$ then
$\lim_{x \rightarrow 5} \frac{x - 5}{(x - 5)^2} = \lim_{x \rightarrow 5} \frac{1}{x - 5} = \pm \infty$
depending on whether you approach $5$ from the left or from the right, but in this case the limit does not exist.
So this is basically the reason why an expression with limits in which you have $0/0$ is undefined. Sometimes you can get a limit that exists like in the first case where the answer is $1$, but other times you can have a limit that doesn't even exist.