If $\lim_{x\to 1}\frac{x^2-ax+b}{x-1} = 5$ then find $a+b$ 
If
$$\lim_{x\to 1}\frac{x^2-ax+b}{x-1} = 5$$
then find $a+b$

The solution which I have says that  $x-1$ tends to $0$. Therefore numerator $x^2 - ax + b$ must tend to $0$ because the limit exists.
My query is: why it is written, that limit exists so numerator of tend to $0$.
 A: We say that $f$ approaches the limit $l$ near $c$ if we can make $f(x)$ as close to $l$ as we like by requiring that $x$ be sufficiently close to, but unequal to, $c$. We write this as $\lim_{x \to c}f(x)=l$. If the statement $\lim_{x \to c}f(x)=l$ is false for every $l\in\Bbb{R}$ (that is, if $f$ does not approach any limit near $c$), then we say that the limit does not exist.
It can shown that if $\lim_{x \to c}g(x)=0$ and $\lim_{x \to c}f(x)\neq0$, then
$$
\lim_{x \to c}\frac{f(x)}{g(x)} \ \text{does not exist.}
$$
Hence, in order for the limit to exist, it must be the case that $\lim_{x \to c}f(x)=0$. In your example, we need to find numbers $a$ and $b$ such that $\lim_{x \to 1}(x^2-ax+b)=0$, and that make the overall limit equal to $5$.
A: $$\frac{x^2-ax+b}{x-1}=x-a+1+\frac{b-a+1}{x-1}$$ and for the limit to exist, the numerator of the fraction must be zero.
Hence
$$\begin{cases}b-a+1=0,\\1-a+1=5.\end{cases}$$
A: For the limit to exist, numerator should also be zero.
$\implies 1-a+b=0$
On applying L'Hopital rule,
$$\mathrm{\frac{2x-a}{1} = 5}$$ when x=1.
$$\implies 2-a =5 \implies a=-3$$
$$\implies b= -4$$
