Solution to Problem2