Answer to problem 2