"Suppose that a measurable subset $P \subset [0,1]$ and the interval $I = [a,b] \subset [0,1]$ are such that
$\lambda(P) = \lambda(I)$, where $\lambda$ is the Lebesgue measure on $[0,1]$. Show that there exists a measure-preserving transformation
$T : [0,1] \to [0,1]$, i.e. $λ \circ T ^{-1} = \lambda$, such that $T(I) \subseteq P$ and $T$ is one-to-one (injective) outside a set of measure zero."
only hints please.
Attempt
1)The $T(x)=\lambda([0,x]\cap [a,b])$ if $x\in [a,b]$ and $b-a+\lambda([0,x]\setminus [a,b])$ if $x\notin [a,b]$ is measure preserving and injective outside a set of measure zero. However, it obviously might no map in P.
2)
You could use the (complete) total ordering of the reals and the fact that the Lebesgue measure is non-atomic. Your (almost everywhere) one-to-one correspondence would match a point $x\in P$ with a point $y\in [a,b]$ if $\lambda([0,x]\cap P)=\lambda([0,y]\cap [a,b])$.