Two facts seem to be involved in getting to the formula in the blue box from the previous formula. One fact is that
$$n+1-(k+1)=n-k.\tag1$$
The other fact is that
$$ x((x-1)!) = x!.\tag2$$
I honestly don’t see why the fact in $(1)$ was invoked at this point. Yes, it’s a true fact, but invoking it just means we write $n+1-(k+1)$
in several places where $n-k$ would work better. Eventually, it might be useful to rewrite $n-k$ that way in order to relate to the expansion of $\binom{n+1}{k+1}$ into factorials, but we only actually make use of that in the last step of the derivation.
In particular, the specific way that the fact in $(2)$ is invoked is that we can multiply
$\frac{n!}{(k+1)!(n-k-1)!}$
by $n-k$ on the top and bottom.
On the top we get $n!(n-k),$
as shown in the blue box, and on the bottom we get
$$(n-k)((n-k-1)!) = (n-k)!,$$
which uses fact $(2)$ with $x$ replaced by $n-k.$
Of course, because of fact $(1)$ It is equally true that
$$(n-k)((n-k-1)!) = (n+1-(k+1))!,$$
which is how we get the formula in the blue box, but I think this is harder to see.