Solution for problem 3
Solution for problem 4a
Step to solve  problem 5