I know that I can solve this making $f(x) = e^{x-1}-2x$ and then applying the formula of the derivative to the expression $\frac{f(x)-f(1)}{x-1}$, so that the answer is $f(1)'$. However, my book has the following hint about this exercise:
Start by rewriting the expression as the sum of two fractions that tend both to indeterminations of the type $\frac{0}{0}$.
So I tried:
$$\lim_{x \rightarrow 1}\frac{e^{x-1}-2x+1}{x-1} = \frac{e^{x-1}+1-2x}{x-1} = \frac{e^{x-1}+1}{x-1} - \frac{2x}{x-1} = ???$$
Which both tend to $\frac{1}{0}$. How do I solve this using my book's hint?
Hint: $$ \lim_{x\rightarrow1}\frac{e^{x-1}-2x+1}{x-1}=\lim_{x\rightarrow1}\frac{e^{x-1}\color{red}{-1}-2x+1\color{red}{+1}}{x-1}=\lim_{x\rightarrow1}\left[\frac{e^{x-1}-1}{x-1}-2\frac{x-1}{x-1}\right] $$