$$\begin{split} \lim_{x\to 1}\frac{\sin(x^2-1)}{x-1} &= \lim_{x\to 1}\frac{(x+1)\sin(x^2-1)}{(x^2-1)} \\ & = 2\lim_{x\to 1}\frac{\sin(x^2-1)}{x^2-1} \\ & = 2\lim_{h\to 0}\frac{\sin(h)}{h} \\ & = 2 \end{split}$$
I'm confused about how $\lim_{x\to 1}\frac{\sin(x^2-1)}{x^2-1} = \lim_{h\to 0}\frac{\sin(h)}{h}$. What's the reasoning behind it and what is the more general rule for this? I'm a fool trying to learn how limits work rigorously - any help would be appreciated.