Worked on problems 5 and 6 for math homework