14.5 (or equivalently 13.6) is the DEFINITION of the structure factor.
(Sometimes people define the structure factor as integral over all space, but we will never do this).
There is no way to derive a definition. One could derive 14.6 that the scattering intensity is proportional to the structure factor squared. Or you could derive 14.7 or 14.8 that the structure factor is a sum over the atoms in the unit cell of a form factor times a phase.
Does that help?