I think you have the right idea...
Let's start with the first part:
If i subs x=2 into the denominator, the denominator goes to 0.
This is fine. But just so I can be sure you know what's going on -- why is it that you can evaluate \lim_{x \to 2} x-2 by substituting x with 2 in (x-2)?
therefore, the numerator should equals 0
Can you say why?
(This is the most important question in my entire post. If you answer only one, make it this one. But you should answer all of them)
That's wrong. Did you mean f(x)=5? That's wrong too. Did you mean f(x) goes to 5? Then that would be right.
It may seem like I'm nitpicking here -- but the ability to write what you actually mean is
incredibly important in mathematics.
If nothing else, once you can write what you mean, then any arithmetic needed to do a calculation usually becomes a lot more evident.
Anyways, can you argue why
\lim_{x \to 2} \left( f(x) - 5\right) = 0
implies
\lim_{x \to 2} f(x) = 5
?
I'm assuming you've had a few homework problems that ask you to do problems exactly like this -- so hopefully this argument has become second nature. If not, you should practice until it is second nature.

I'll give a hint: you pretty much have only one theorem that relates limits and subtraction, so you should use it!