Solution (source code)

= Solution

For the <scalar gauge transformation with trace-free spatial shear>, put $L_i=\partial_iL$. Part (ii) and the velocity rule give
$$
\widetilde E=E-L,\quad\widetilde B=B+T-L',\quad
\widetilde v=v+L',\quad
\widetilde\phi=\phi+\mathcal HT+\tfrac13\nabla^2L.
$$
Define $C=\phi+\nabla^2E/3$ and $w=B+v$. Then $\widetilde C=C+\mathcal HT$ and $\widetilde w=w+T$. Therefore \b[$\mathcal R=-C+\mathcal Hw$ is gauge-invariant], because the two time-shift terms cancel.

To identify the hypersurfaces, lower the index on the matter four-velocity. To first order its spatial components are $u_i=-a(B_i+v_i)=-a\partial_iw$. The matter worldlines are orthogonal to constant-time slices when $u_i=0$, which for the inhomogeneous scalar modes is $w=0$. Choose $T=-w$ to reach this comoving slicing. Then $C_{\rm co}=C-\mathcal Hw=-\mathcal R$. Applying the supplied intrinsic-curvature formula on those slices gives
$$
\boxed{a^2\,{}^{(3)}R_{\rm co}=4\nabla^2C_{\rm co}=-4\nabla^2\mathcal R}.
$$
Spatially homogeneous additions to the scalar potentials do not affect this curvature.