Added solutions for Problem 2 and Problem 3