As Jomo said, first try putting the limit value for x, here 5, into the fraction. The only "difficult part" is the last- if both numerator and denominator are 0, where he said "4) If you get 0/0, then you are not done. Somehow you have to get rid of that 0/0. Be clever." Here is a hint that will help you be clever: If x= a makes a polynomial 0 then x- a is a factor of the polynomial!
Here the polynomial in the numerator is \(\displaystyle x^3- 9x^2+ 21x- 5\) and the denominator is x- 5. Clearly when x= 5, the denominator is 5- 5= 0. According to what Jomo said, if the numerator is NOT 0 when x= 5, there is no limit. But setting x= 5 in the numerator gives 125- 225+ 105- 5= 100- 100= 0. So we have to be "clever". Fortunately we now know that x- 5 is a factor of \(\displaystyle x^3- 9x^2+ 21x- 5\). x divides into \(\displaystyle x^3\) \(\displaystyle x^2\) times and \(\displaystyle x^2(x- 5)= x^3- 5x^2\). Subtracting \(\displaystyle x^2(x- 5)\) from \(\displaystyle x^3- 9x^2+ 21x- 5\) leaves a remainder of \(\displaystyle -4x^2+ 21x- 5\). x divides into that \(\displaystyle -4x\) time. \(\displaystyle -4x\) times x- 5 is \(\displaystyle -4x^2+ 20x\). Subtracting \(\displaystyle -4x^2+ 20x\) from \(\displaystyle -4x^2+ 21x- 5\) leaves a remainder of \(\displaystyle x- 5\) and \(\displaystyle x- 5\) obviously divides into that once with no remainder!
\(\displaystyle x^3- 9x^2+ 21x- 5= (x- 5)(x^2- 4x+ 1)\) so \(\displaystyle \frac{x^3- 9x^2+ 21x- 5}{x- 5}= \frac{(x- 5)(x^2- 4x+ 1)}{x- 5}\).
As long as \(\displaystyle x\ne 5\) we can cancel "x- 5" in the denominator leaving \(\displaystyle x^2- 4x+ 1\). And it is important to remember that the limit, \(\displaystyle \lim_{x\to a} f(x)\) depends only on the values of f(x) close to a but not at x= a! This limit is the same as \(\displaystyle \lim_{x\to 5} x^2- 4x+ 1\). And now we can do #1 on Jomo's list. Setting x= 5, \(\displaystyle 5^2- 4(5)+ 1= 25- 20+ 1= 1+ 1= 2\).
\(\displaystyle \lim_{x\to 5}\frac{x^3- 9x^2+ 21x- 5}{x- 5}= \lim_{x\to 5} x^2- 4x+ 1= 2\).
(If the given function is defined "piecewise", as JeffM seems to be concerned about, Jomo's method can be applied to each "piece", again recalling that \(\displaystyle \lim_{x\to a} f(x)\) depends only on what happens close to a, so if a is in one "piece" we can ignore all the others and if a is the point where one "piece" meets another, we can just look at those two pieces.)