The substitution step could be done rigorously if you use the infinite series definition of the exponential. That would give a different result if you have a number other than “e”.

I think without the infinite series definition of the exponential function (or the definition as the inverse of the logarithm), the farthest you can go with this is that the derivative of exp is proportional to exp.

EDIT: what cuzz said

Right, I claimed that you can't use that substitution without already knowing the derivative of e^x is itself, but in fact you can if you

*define* the exponential function as its Maclaurin series. But then the fact that the derivative of the function defined by 1+x+x^2/2 + x^3/6 + ... is itself is completely trivial via term-by-term differentiation (modulo the fact that you'd need to prove or just accept both that the series converges and that functions defined by power series are differentiable term-by-term).

In fact, it's worth thinking about what your original definition of the exponential function even is, as this can make a difference as to whether any given fact about it is a theorem or a tautology. For example, it's also perfectly reasonable to define the exponential function as the unique function satisfying f'(x) = f(x) and f(0) = 1, once you prove that such a function exists and is unique.