Susan and Tony are selling pies for a school fundraiser. The choices are pecan pie or apple pie. Susan sold 13 pecan pies and 9 apple pies for a total of $173. Tony sold 6 pecan pies and 3 apple pies for a total of $66. Find the cost of each pie.

Let x be the cost of a pecan pie and y be the cost of an apple pie. We have the following system of equations:

13x + 9y = 173
6x + 3y = 66

We can multiply the second equation by 3 to get:

18x + 9y = 198

Subtract the first equation from this new equation:

5x = 25

Solve for x:

x = 5

Now substitute the value of x back into the first equation:

13(5) + 9y = 173

65 + 9y = 173

9y = 108

Solve for y:

y = 12

So the cost of a pecan pie is $5 and the cost of an apple pie is $12.