Write and solve a system of equations to determine the cost of one pecan pie and the cost of one apple pie.

Pies are selling for a fundraiser. Person 1 sold 13 pecan pies and 9 apple pies for a total of $173. Person 2 sold 6 pecan pies and 3 apple pies for a total of $66. Find the cost of one pecan pie and one apple pie.

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

13p + 9a = 173
6p + 3a = 66

We can multiply the second equation by 3 to make the coefficients of a equal in both equations:

3(6p + 3a) = 3(66)
18p + 9a = 198

Now we can subtract the first equation from this new equation to eliminate a:

(18p + 9a) - (13p + 9a) = 198 - 173
5p = 25

Now, solve for p:
p = 5

Now, plug this value of p back into either of the original equations to find the value of a. We will use the second equation:

6(5) + 3a = 66
30 + 3a = 66

Subtract 30 from both sides:
3a = 36

Divide by 3:
a = 12

So, one pecan pie costs $5 and one apple pie costs $12.