Give the step-by-step reasoning process and then the final answer. Greg has his own dog walking business. He charges $20 per dog plus $1 per minute per dog for walking the dog. If he walks one dog for 10 minutes, two dogs for 7 minutes and three dogs for 9 minutes, how much money, in dollars, does he earn?
Single dog is $20 + (10 minutes * $1 per minute) = $30. Two dogs are 2 * ($20 + (7 minutes * $1 per minute)) = $54. Three dogs are 3 * ($20 + (9 minutes * $1 per minute)) = $87. The total is $30 + $54 + $87 = $171.
The final answer: 171.