Solved question 1.
Solved problem 2.