If $f(x) = x^2$, use the derivative definition to prove $f'(x) = 2x$. Starting with the difference quotient:
$$\lim_{{h \to 0}} \dfrac{f(x+h)-f(x)}{h}\ = f'(x)$$
Substituting $f(x) = x^2$, we get:
$$\lim_{{h \to 0}} \frac{(x + h)^2 - x^2}{h} = \lim_{{h \to 0}} \frac{2xh + h^2}{h}$$
Factoring out $h$ in the numerator:
$$\lim_{{h \to 0}} \frac{2xh + h^2}{h} = \lim_{{h \to 0}} \frac{h \cdot (2x + h)}{h} = \lim_{{h \to 0}} 2x + h$$
At this point, we want to find the derivative $f'(x)$ by taking the limit as $h$ approaches $0$:
$$\lim_{{h \to 0}} (2x + h) = 2x$$
This is the step that is confusing to me. In my calculus $1$ classes we would usually plug in $h=0$ to get $f'(x)=2x+0=2x$. However, in the earlier step we factored out $h$, and we treated $h$ as approaching $0$ but not exactly equal to $0$ to be able to divide $h/h$. So, if we treat $h$ as equal to $0$ in the last step then wouldn't this mean that we just divided $0/0$ in the step where we had factored?
My only other guess was that we are allowed to divide $h/h$ because we are treating the $h$ in $2x+h$ as a value that is so small and so close to $0$ that we basically just ignore it, and, since it is not actually equal to $0$ this means that we can still do $h/h$. I was not sure if this is what we are doing and maybe in calculus 1 classes we just plug in $h=0$ in the final step to make it easy?