Final answer:
The price of a cookie is $0.77 and the price of a donut is $1.30.
Step-by-step explanation:
To solve this problem, we can set up a system of equations. Let's represent the price of a cookie as C and the price of a donut as D. From the information given, we can create the following equations:
- 4C + 9D = 14.78 (equation 1)
- 6C + 6D = 12.42 (equation 2)
Now, we can solve this system of equations using any method, such as substitution or elimination. Let's use the elimination method:
- Multiply equation 2 by 2:
- 12C + 12D = 24.84
- Subtract equation 1 from equation 2:
- 12C + 12D - (4C + 9D) = 24.84 - 14.78
- 8C + 3D = 10.06 (equation 3)
- Multiply equation 1 by 3:
- 12C + 27D = 44.34
- Subtract equation 3 from equation 1:
- 12C + 27D - (8C + 3D) = 44.34 - 10.06
- 4C + 24D = 34.28
- Divide equation 4 by 4:
- C + 6D = 8.57 (equation 4)
- Substitute the value of C from equation 4 into equation 3:
- 8(8.57 - 6D) + 3D = 10.06
- 68.56 - 48D + 3D = 10.06
- -45D = -58.5
- D = 1.3
- Substitute the value of D into equation 4:
- C + 6(1.3) = 8.57
- C + 7.8 = 8.57
- C = 0.77
Therefore, the price of a cookie is $0.77 and the price of a donut is $1.30.