For problem 1:
For problem 2, part a
For problem 2, part b
The exam pdf is available here