Solve Exercise 3.9 and 3.10