Problem 6 Solution.