You must consider what a change of variable means. In general, you have a function ##x = g(u)##. That allows us to define a new function by composition:
$$h(u) = f(x) = f(g(u))$$We can now apply the chain rule to get:
$$h'(u) = f'(g(u))g'(u)$$In the case where ##g(u) = -u##, we have ##g'(u) = -1## and:
$$h'(u) = -f'(-u)$$Note that many textbooks will use the same function symbol ##f## for both the original function and the composite function ##h## here. And you end up with $$f'(-x) = -f'(x)$$or $$\frac{df(-x)}{dx} = - \frac{df(x)}{dx}$$PS note that, strictly speaking, these last two are wrong - but they are very common, especially in physics textbooks.