For any one piece of the medium, the kinetic energy is a maximum when the piece passes through the equilibrium position. The potential energy is also maximum there - that's where the springs connecting the piece to its neighbors are stretched the most. The average kinetic energy equals the average potential energy.
The forces between the pieces of the medium continually do work to transport energy through the medium. The energy being transported is the energy being put into the system by whatever is shaking the first piece in the medium.
The book derives the fact that the average power being transmitted by a wave on a string is:
Pavg = ½ m ω2 A2 v