The book is correct, but I can see how that might be confusing.
So, I'll try to explain this a little differently...
When something is "reduced", it gained electrons.
And when something is "oxidized", it lost electrons.
Now when a reducing agent gives away its electrons to another substance, it's the same thing as saying that the reducing agent lost electrons, which is the same thing as saying the reducing agent was "oxidized". Meanwhile, that other substance in the reaction was "reduced" because it gained electrons (from the reducing agent).
Likewise, when a oxidizing agent takes electrons from another substance, it's the same thing as saying that the oxidizing agent is gaining electrons, which is the same thing as saying the oxidizing agent was "reduced". Meanwhile, the other substance in the reaction was "oxidized" because it lost electrons (to the oxidizing agent).