Finding the derivatives using limits. What to do when you have a limit inside a limt I was trying to prove the second derivative formula using limits
\begin{align}f'(x) &= \lim_{h\rightarrow 0}\dfrac{f(x+h)-f(x)}{h} \\f''(x) &= \lim_{h\rightarrow 0}\dfrac{f'(x+h)-f'(x)}{h} \\ &= \lim_{h\rightarrow 0}\dfrac{\lim_{h\rightarrow 0}\dfrac{f(x+2h)-f(x+h)}{h}-\lim_{h\rightarrow 0}\dfrac{f(x+h)-f(x)}{h}}{h} 
\end{align}
However I'm not sure how to go about simplifying this as there is a limit inside of another limit. Does the limit inside nullify as they both tend to zero? If yes, what exactly is the logic behind this and are there any underlying assumptions?

What you have done is almost fine but you should use different symbols for different limit operators like $$f''(a) =\lim_{h\to 0}\dfrac{\lim_{k\to 0}\dfrac{f(a+h+k)-f(a+h)}{k}-\lim_{l\to 0}\dfrac{f(a+l)-f(a)}{l}}{h}$$ However if you are trying to achieve a definition of $f''$ solely in terms of $f$ as a sort of complicated limit then that's not going to work.
Why?? Lets understand the requirements of the definition of derivative as a limit. As a pre-requisite we must have $f$ defined in a certain neighborhood of $a$ so that the expression under limit used for $f'(a) $ makes sense. Thus in order to define $f''(a) $ we must have $f' $ defined in some neighborhood of $a$. Now that requirement can not be met using any definition like $$f''(a) =\lim_{h\to 0}g(a,h)$$ because we are essentially dealing with just the neighborhood of $a$ and it can not guarantee us anything about the behavior of a function at points other than $a$.
