Solution (source code)

= Solution

Put $A_t=[M]_t$. Its continuous, strictly increasing paths start at zero and tend to infinity. Thus the inverse $T_s$ is finite and continuous, and
$$
\{T_s\le u\}=\{A_u\ge s\}\in\mathcal F_u,
$$
so each $T_s$ is a <stopping time>. Set $\mathcal G_s=\mathcal F_{T_s}$ and $\beta_s=M_{T_s}$. This is the inverse-clock construction in the <Dambis-Dubins-Schwarz theorem>.

To verify its <martingale> property, stop $M$ at times $\tau_n$ bounding its path, its bracket and time itself. The stopped $M$ and $M^2-A$ are bounded <martingales>. <Optional sampling> at $T_s\wedge\tau_n$ and $T_t\wedge\tau_n$ shows that the time-changed process, stopped at $A_{\tau_n}$, is a <martingale> and that its square minus the stopped clock $s\wedge A_{\tau_n}$ is a <martingale>. These clock <stopping times> tend to infinity because $A_\infty=\infty$. Therefore $\beta$ is a <continuous local martingale> with $\beta_0=0$ and <quadratic variation> $[\beta]_s=s$. The <Lévy characterization of Brownian motion> identifies it as a $\mathcal G_s$-Brownian motion.

Strict monotonicity and continuity give $A_{T_s}=s$ and $T_{A_t}=t$, so
$$
\boxed{M_t=\beta_{[M]_t}}.
$$
The inverse-clock argument proves the asserted representation; the random clock need not be independent of the <Brownian motion> it produces.