Add solutions for Problem 5.