finding a solution to problem number 2 A's answer