Can anyone explain the move in this answer (
math.stackexchange.com/a/4199761/109355) where $\tilde g(x)$ is defined as $g(-x)$? This isn't a regular, "Introduction to Calculus u-substitution" for $-x$, because $g$ is given the new name, not $x$, but if it is just saying "consider some new function which happens to be the same as $g$, but where $-x$ is replaced with $x$," then it isn't clear how the answer justifies applying the chain rule in the second equation that follows.