Solution (source code)

= Solution

Let $\nu_c$ be the photon <frequency> in the local comoving frame just after emission. The <kinematic redshift> gives $\nu_e/\nu_c=1+z_{\rm kin}$, and propagation in the <FRW metric> gives $\nu_c/\nu_0=1+z_{\rm cosm}$. Multiplication gives
$$
\boxed{1+z_{\rm tot}=(1+z_{\rm cosm})(1+z_{\rm kin}).}
$$
Equivalently, $z_{\rm tot}=z_{\rm cosm}+z_{\rm kin}+z_{\rm cosm}z_{\rm kin}$. Both redshifts being small is what permits their approximate addition. Here the observer's own <peculiar velocity> is assumed already corrected to the <Hubble flow> frame.