Answer
You need to pay $14.20 to get 4 coffees and 6 donuts.
Explanation
Let's say that the price of one coffee and x and the price of one donut is y.
In the first instance, 3x+4y=10.05.
In the second instance, 5x+7y=17.15.
You can use these equations to find the value of a coffee and the value of a donut.
We can find x and y using elimination. To do this, you should add or subtract one equation from another to "get rid" of a variable (I'll "get rid" of x). We can't just add or subtract the equations right now, since that wouldn't lead to 0x.
Multiply the first equation by 5, and the second equation by 3. After this, both equations will have 15x. Make sure to multiply each term by 5 and 3.
15x+20y=50.25. This means that 15 coffees and 20 donuts is $50.25.
15x+21y=51.45. This means that 15 coffees and 21 donuts is 51.45.
Now since there are an equal number of coffees, we can subtract these equations.
(15x+21y=51.45)-(15x+20y=50.25) equals y=1.20 (a donut costs $1.20).
Plug the price of the donut into y to find x; 3x+4(1.20)=10.05. The value of x is 1.75. The price of a coffee is 1.75.
You can multiply 1.75 by 4 to find the price of 4 coffees and 1.20 by 6 to find the price of 6 donuts.
1.75*4 is 7.00 and 1.20*6 is 7.20.
You can add those to find the total price; 7.00+7.20=14.20.