Two approaches to the method of integration by substitution I came across two approaches to the method of integration by substitution (in two different books).

Approach I

Let $I=\int f(\phi(x))\phi'(x) dx$

Let $z=\phi(x)$

$\therefore \phi'(x)dx=dz$

$\therefore I=\int f(z)dz$

Approach II

Let $I=\int f(x) dx$

Let $x=\phi(z)$

$dx=\phi'(z) dz$

$\therefore I=\int f(\phi(z))\phi'(z) dz$

My problem: While i can understand Approach I, I cannot understand Approach II. What is the difference between the two approaches. What is the difference in their applicability and usage? I am very confused. Please help.
A concrete example of approach 1 may be something like $\int\frac{1}{1+\sqrt x}\,\mathrm{d}x$ and you make the substitution $x=z^2$ in order to get rid of the square root. In this case our $\phi(z)=z^2$ and $\phi’(z)=2z\,\mathrm{d}z$, this makes our integral solvable by some trivial algebra and is already completely in terms of $z$ without any extra algebraic manipulation. Approach 2 on the other hand noticed that there is a derivative of a function on the outside such as $\int 2x\sin x^2\,\mathrm{d}x$ and one makes the substitution $z=x^2$. Both of these are ways to reverse the chain rule as you may recall $(f(g(x)))’=f’(g(x))g’(x)$, although the second approach is pretty much explicitly reversing the chain rule so is the first one in a different manner.
Neither approach as you have it is quite right, because each is missing the final step. In approach 1, suppose you can find an antiderivative $F(z)$ for $f(z).$  Are you done? No, remember you were looking for an antiderivative for $f(\phi(x))\phi'(x).$ The desired answer is $F(\phi(x)).$ Why? Because by the chain rule,

$$(F\circ \phi)'(x)F'(\phi(x))\phi'(x)=f(\phi(x))\phi'(x).$$

Approach 2 also follows from the chain rule, but it's more complicated. Here it's important that $\phi^{-1}$ exist and be differentiable. If we then find an antiderivative $g(z)$ for $f(\phi(z))\phi'(z),$ then $g\circ \phi^{-1}(x)$ is an antiderivative of $f(x),$ which is what we want. Let's see why: By the chain rule,

$$\tag 1(g\circ \phi^{-1})'(x)= g'(\phi^{-1}(x))\cdot(\phi^{-1})'(x)$$ $$ =f(\phi(\phi^{-1}(x)))\cdot\phi'(\phi^{-1}(x))\cdot(\phi^{-1})'(x).$$

Recalling $(\phi^{-1})'(x)= 1/[\phi'(\phi^{-1}(x))]$ (again by the chain rule), we see the last two factors on the right of $(1)$ cancel, leaving us with $f(\phi(\phi^{-1}(x))) = f(x)$ as desired.