Light in a universe described by the Robertson-Walker metric is observed as having a given redshift $z$. What is $dt_e/dt_o$?

The universe is described by the Robertson-Walker metric, so \begin{equation} 1+z=\frac{a(t_o)}{a(t_e)}. \end{equation} I am looking for the rate of change of the time of observation of the light, with respect to the time of emission. I know the answer depends on the fact that the comoving coordinate of the source is constant, and that the answer is $dt_e/dt_o=1/(1+z)$, but I am having trouble deriving this. The metric for a photon is \begin{equation} cdt = a(t)dr \end{equation} so the comoving coordinate of the source is given by \begin{equation} r=c\int_{t_e}^{t_o} \frac{dt}{a(t)}=\text{constant with time}. \end{equation} How can I derive from this that $dt_e/dt_o=1/(1+z)$?

You can use the Leibniz integral rule. If $r$ is constant with time, \begin{equation}\frac{d}{dt}\int_{t_e}^{t_o}\frac{dt'}{a(t')}=0\end{equation} Using Leibniz rule, since \begin{equation} \frac{d}{dt}\frac{1}{a(t')}=0,\end{equation} you end up with \begin{equation} \frac{1}{a(t_o)}\frac{dt_o}{dt}=\frac{1}{a(t_e)}\frac{dt_e}{dt}.\end{equation} Now, with chain rule to eliminate $dt$, and with the definition of $z$, you get \begin{equation}\frac{dt_e}{dt_o}=\frac{1}{1+z}.\end{equation}