can you explain the solution for problem 562 step by step