Hi.
Yes, everything written so far is correct. But the author requires some hard equations I guess. So here's the deal with energy densities.
In following notes:
[itex]\rho[/itex] denotes [itex]T_{00}[/itex] component of energy density tensor: energy density itself;
[itex]p[/itex] denotes [itex]T_{ii}[/itex] component of energy density tensor: impulse density;
[itex]z[/itex] denotes redshift.
Energy and impulse are related in FLRW model by equation
[itex]\dot{ \rho} = -3 \frac{\dot {a(t)}}{a(t)} \left( \rho + p \right)[/itex]
Here [itex]a(t)[/itex] is scale factor proportional to a distance traversed by a particle emitted at the very moment of big-bang-bong. This equation comes from Einstein equations for FLRW metric [itex]\delta s^2 =\delta t^2 -a^2(t) \left[ \delta r^2 + r^2 \delta \Omega^2 \right][/itex].
There are basically 3 possibilities for energy source: matter, radiation and cosmological constant.
Matter: it refers to non-relativistic matter. It is characterized by the fact that it has rest energy, so there is energy densitiy. However, being non-relativistic, one can approximate it by saying it's impulse is negligible compared to rest energy. So matter has impulse 0. Thus, [itex]\rho_M[/itex] exists, of course, but [itex]p_M =0[/itex].
Radiation: all relativistic matter, massive or massless alike. Has energy of course, and impulse is 1/3 of the energy. So, [itex]p_R = \rho_R /3[/itex]. Why [itex]1/3[/itex]? It comes from statistical mechanics. Of all particles present in a box, [itex]1/3[/itex] of them will move in Your direction in 3D world.
Cosmological constant: it acts anti-gravitationally. Seriously: [itex]p_\Lambda = - \rho_\Lambda[/itex].
So, let us employ Einstein equation now. First: matter! [itex]p_M = 0[/itex], and hence
[itex]\dot{ \rho_M} = -3 \frac{\dot {a(t)}}{a(t)} \rho_M[/itex]
In other words,
[itex]\frac{\dot{ \rho_M}}{\rho_M} = -3 \frac{\dot {a(t)}}{a(t)}[/itex]
So [itex]\rho_M = 1/a^3(t)[/itex]. I chose constant of integration as 1 for simplicity. So You see, matter density behaves like ordinary density we are accustomed to. It preserves overall rest energy, here taken to be equal to 1. One may take this as conservation of particle number, obviously.
Next in line is: radiation! [itex]p_R = \rho_R /3[/itex], and hence
[itex]\dot{ \rho_R} = -3 \frac{\dot {a(t)}}{a(t)} \left( \rho_R + \frac{\rho_R }{3} \right)[/itex]
In other words,
[itex]\frac{\dot{ \rho_R}}{\rho_R} = -4 \frac{\dot {a(t)}}{a(t)}[/itex]
So [itex]\rho_R = 1/a^4(t)[/itex]. I chose constant of integration as 1 for simplicity. So You see, radiation density does not behave like ordinary density. As space-time expands, radiation energy is not conserved... Well, it is conserved, but not in the way one might expect at first. The other Einstein equation makes sure it is so.
So, how come photon energy drops with universe expanding? As universe expands, it stretches. Just notice stretching factor [itex]a(t)[/itex] in FLRW metric. So, photon's wavelength also stretches, and this way photon loses energy just by being in a flow in universe. Yeah, that means Earth and every object in universe stretches too! No, no, no, no! You see, there is something fishy here, because we don't stretch. Just photon's wavelength. Yes, I know, it's a fairytale. There is an explanation for it, but You won't find it with standard explanations. So just take it for granted: [itex]\rho_R = 1/a^4(t)[/itex].
Finally, here comes the king: cosmological constant! Well, as name suggests - it's constant!
So, what is redshift [itex]z[/itex] here? How does it relate to the only free parameter in our theory: [itex]a(t)[/itex]? Well, if photon had wavelength [itex]a(t)[/itex] and then universe flows a while and now photon's wavelength today is [itex]a_0[/itex], then redshift [itex]z[/itex] is by definition
[itex]1+z=\frac{a_0}{a(t)}[/itex]
In other words: wavelength observed today / wavelength originally emitted.
So, today [itex]\rho_{M0} = 1/a_0^3[/itex]. Yesterday it was [itex]\rho_M = 1/a^3 (t)[/itex]. So, [itex]\rho_{M0} a_0^3 = \rho_M a^3 (t)[/itex]. In other words,
[itex]\rho_M = \rho_{M0} \frac{a_0^3}{a^3 (t)} = \rho_{M0} (1+z)^3[/itex]
This explains notation You mentioned.
Finally, we all wonder: "so how is photon's energy then conserved...?"
OK, Einstein equations, and there are 2 of them, because we work with time and space both, also say that first law of thermodynamics is in action here. Universe expands adiabatically, so thermodynamics says
[itex]p \; dV = -d \left( \rho V \right)[/itex]
This is just conservation law. This is exactly the second Einstein equation. When You put photon numbers in, You get identity. So everything is fine in the end.
I hope this helped a bit. Please do ask if You happen to have some further trouble with it.
Cheers.