Solved Chapter5 problems.