Solution (source code)

= Solution

For each <Fourier mode> the equation is $\Phi_k''+6\mathcal H\Phi_k'+k^2\Phi_k=0$. Set $\Phi_k=a^{-3}u_k$. Direct differentiation removes the first <derivative> and gives
$$
u_k''+\left[k^2-3\mathcal H'-9\mathcal H^2\right]u_k
=u_k''+\left[k^2-\frac3{4\tau^2}\right]u_k=0.
$$
For $|k\tau|\gg1$, the inverse-square term is negligible, and the positive incoming-frequency branch has $u_k\sim A_ke^{-ik\tau}$. Therefore
$$
\boxed{\Phi_k\sim A_ka^{-3}e^{-ik\tau}.}
$$
The momentum constraint then gives
$$
\delta\phi_k=\frac{2(\Phi_k'+\mathcal H\Phi_k)}{\phi_0'}
\sim\frac{2ikA_k}{C}\,a^{-1}e^{-ik\tau},
$$
where $\phi_0'=-C/a^2$. Thus the scalar perturbation has precisely the required $a^{-1}$ behavior. Conversely, the two constraints imply the potential equation in part (c); reconstructing $\delta\phi$ by the momentum constraint therefore satisfies the energy constraint too. This checks compatibility beyond simply comparing powers of $a$.