You only need three wire between the fixtures if the switch is on a branch off from the lamps
supply =2+e= lamp =3+e= lamp =2+e= switch
but new requirements for smart switches require 3 wires to the switch in that setup now
supply =2+e= lamp =3+e= lamp =3+e= switch
That setup is frowned upon these days because CFLs can blink when the switch is off.
You have the supply going direct to the switch (which is the preferred setup) so you only need 2+earth going from the switch to the lamps
If any of those boxes are metal the earth wire should connect to the box. if not just join it with a wire nut as you show.
The book is describing a situation where the power is left of the lamps, and the switch is to the right. Further, the book is wrong - you must use 3+ground cable between lamp and last switch.
Or to be more precise:
- Neutral (white) must go to every location including the switch.
- Always-hot (black) must go between the power source and the switch, no matter how far that is.
- Switched-hot (red or other distinguishing color) must go between the switch and all lamps. If black is not needed in this particular cable segment, then don't use 3+ground, use 2+ground and mark the black wire red (for real or pretend).
Since the switch is the first place power goes, you don't need always-hot between switch and lamps, so 2+ground cable is appropriate throughout.