Chapter 5 solutions.

Might have got a bit mixed up with the exercise 2 question ... meh.