Rory, Mary, and Pat took advantage of the used book sale at their local library. They each purchased some mysteries, non-fiction, and science fiction books. Rory purchased a total of 7 books. Mary purchased the same number of mysteries, four times as many non-fiction, and twice as many science fiction books as Rory. Mary purchased a total of 14 books total. Pat purchased three times as many mysteries, three times as many non-fiction, and five times as many science fiction books as Rory. Pat purchased 23 books and needed help carrying them to the car. How many books of each type did Pat purchase?

Be sure to define your variables and show all your work.