Let $P(x)=x^{2}-6x+5$ and $Q(x)=x-5$. Since $P(x)$ and $Q(x)$ are continuous and $P(5)=Q(5)=0$, $\frac{P(5)}{Q(5)}$ is undetermined. You have two alternatives:
- manipulate algebraically $\frac{P(x)}{Q(x)}=\frac{x^{2}-6x+5}{x-5}$.
- use L'Hôpital's rule $\lim_{x\rightarrow 5}\frac{P(x)}{Q(x)}=\lim_{x\rightarrow 5}\frac{P^{\prime }(x)}{Q^{\prime }(x)}=\lim_{x\rightarrow 5}\frac{2x-6}{1}=2\cdot 5-6=4.$
In option 1, since $P(5)=0$, you know that you can factor $P(x)$ as $P(x)=x^{2}-6x+5=(x-5)(x-c).$
You can compute $c=1$, by solving the equation
$x^{2}-6x+5=0.$
Instead you can perform a long division, as suggested by Bill Dubuque, to evaluate $P(x)/Q(x)=x-1$.
So, $P(x)=x^{2}-6x+5=(x-5)(x-1)$ and $\lim_{x\rightarrow 5}% \frac{P(x)}{Q(x)}=\lim_{x\rightarrow 5}\frac{(x-5)(x-1)}{x-5}% =\lim_{x\rightarrow 5}(x-1)=5-1=4.$
You are allowed to divide $P(x)$ and $Q(x)$ by $x-5$, because you perform a limiting process, and you actually never make $x=5$, which means $x-5$ is never equal to $0$.