I need to find a multiple of 5 plus 3 and also a multiple of 7 plus 5 that is less than 40, since 40 quarters would be 10 dollars. I can start by listing some multiples of 5 plus 3: 8, 13, 18, 23, 28, 33, 38. Then I can see which of these are also multiples of 7 plus 5: 12, 19, 26, 33, 40. The only one that is common to both lists is 33, so Wendy has 33 quarters. 
Wendy noticed when she stacked her quarters in piles of 5 she had 3 left over and when she stacked them in piles of 7 she had 5 left over. If she has less than ten dollars worth of quarters, how many quarters does she have?