Solved for first two questions

Solved for first two questions