Using the chain rule for functions raised to some power, like (2x+4)^2, the "inside function" is considered the base of the power. But for exponential functions like e^(2x+4) the inside function is the exponent itself.
Why is that? How do you determine which function is the inside/outside when using the chain rule?
The chain rule states that the derivative of $f(g(x))$ is equal to $f'(g(x)) \cdot g'(x)$. Here, $g$ is the inner function, and $f$ is the outer function.
If you want to write your examples in this way, then in the first case we have (for example) $f(x) = x^2$ and $g(x) = 2x+4$, as then $f(g(x)) = f(2x+4) = (2x+4)^2$. Hence $2x+4$ is the inner function.
In the second case, we have (for example) $f(x) = e^x$ and $g(x) = 2x + 4$, as then $f(g(x)) = f(2x+4) = e^{2x+4}$. Hence $2x+4$ is the inner function.