First, we'll substitute x by 5 and we'll verify if it is an indetermination:
lim (x^2-6x+5)/(x^2-25) = (5^2-6*5+5)/(5^2-25) = (30-30)/(25-25) = 0/0
Since we've get an indetermination, that means that x = 5 represents a root for both numerator and denominator.
We'll determine the 2nd root of the numerator, using Viete's relations:
5 + x = 6
x = 6 - 5
x = 1
We'll rewrite the numerator as a product of linear factors:
x^2-6x+5 = (x-1)(x-5)
We notice that the denominator is a difference of 2 squares and we'll write it as a product.
x^2 - 25 = (x-5)(x+5)
We'll re-write the limit
lim (x^2-6x+5)/(x^2-25) = lim (x-1)(x-5)/(x-5)(x+5)
We'l simplify inside limit:
lim (x-1)(x-5)/(x-5)(x+5) = lim (x-1)/(x+5)
We'll substitute again x by 5:
lim (x-1)/(x+5) = (5 - 1)/(5+5) = 4/10 = 2/5
The limit of the function, if x approaches to 5, is: lim (x^2-6x+5)/(x^2-25) = 2/5.