Let cherry pies be represented by c, and let lemon meringue pies be represented by m. This means Maria sold 4c and 2m for a total of 96. Also Cody sold 5c and 5m for a total of 170.
The cost of each item is now calculated by the following system of simultaneous equations;
![\begin{gathered} 4c+2m=96---(1) \\ 5c+5m=170---(2) \\ \text{Multiply equation (1) by 5 and multiply equation (2) by 4} \\ 20c+10m=480---(3) \\ 20c+20m=680---(4) \\ \text{Subtract equation(3) from equation (4)} \\ 10m=200 \\ \text{Divide both sides by 10} \\ m=20 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/3o0381rp76x4676l39s48tj86ry0luv6d1.png)
This means the lemon meringue pies sold for $20 each. We shall now substitute for the value of m = 20 into equation (1);
![\begin{gathered} 4c+2m=96 \\ 4c+2(20)=96 \\ 4c+40=96 \\ \text{Subtract 40 from both sides} \\ 4c=56 \\ \text{Divide both sides by 4} \\ c=14 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/zbc3w9gaxxqbc6bx3khd7ufd5qjix6l2ac.png)
Therefore, the cherry pie cost $14 each