This is a worked example from a text.
a) Find an expression for the number of photons per unit volume with energies between $E$ and $E+dE$ in a cavity at temperature $T$. $$n(E)dE = g(E)f(E)dE = \frac{8 \pi E^{2}dE}{(hc)^{3}(e^{(\frac{E}{K_{B}T})}-1)}$$
The second part confuses me very badly, to the point of it being disturbing.
b) Find an expression for the total number of photons per unit volume (all energies) $$\frac{N}{V} = \int_{\infty}^{0}n(E)dE = \frac{8 \pi ((K_{B}T))^{3}}{(hc)^{3}}\int_{0}^{\infty}\frac{(\frac{E}{K_{B}})^{2}(\frac{dE}{K_BT})} {e^{\frac{E}{K_{B}T}}-1}$$
Where did $$((K_{B}T))^{3}$$ come from and why is the numerator divided by $$K_{B}T$$ Obviously, the energy of a photon is $E=hf$ and not $$K_{B}T$$ and even if it was I can see that constants are moved outside of the integral operator.
Any help is going to be tremendously helpful!
Thanks in advance