This is pretty grotesque.
You need to first know a property of the Dirac delta distribution. It is stated as
$$\tag1\delta[g(x)]=\frac{\delta(x-x_0)}{|g^\prime(x_0)|}$$
on Wikipedia, say, for any function $g$ that has a simple isolated root at $x_0$, and we will be using this property in reverse for many times.
There are many skipped steps, even at the front.
$$
\begin{align}
\tag21&=\int_0^1\mathrm d\rho\\
\tag3 &=\int_0^1\mathrm d\rho\int\mathrm dt\ \delta(t-c)
\end {align}
$$
where the integral of $t$ just needs to include $c$; it is then sensible to choose any $c$ we like, which is in particular $c=P^{-1}[P(u)+\ln\rho]$ that the text used.
We can now apply the property above backwards twice, once on the CDF function $P$ and another time on the exponential $\mathrm e$, leading to the 2nd to last line. By the FTC, $P(t)-P(u)=-\int_t^u p(x)\mathrm dx$
The last line is then a swapping of the integrals, since we are free to use the Dirac delta distribution to destroy $\rho$ rather than $t$, and to do that properly, you also have to consider the integration region.