t = cost of toast, b = cost of bagel, m = cost of muffin
2t + b = 3.15 Equation 1
b + m = 3.5 Equation 2
t + 2b + 3m = 8.15 Equation 3
Use elimination:
2*Equation 3 - Equation 1:
2t + 4b + 6m - 2t - b = 16.3 - 3.15; 3b + 6m = 13.15 Equation 3.1
6*Equation2 - Equation 3.1:
6b + 6m - 3b - 6m = 21 - 13.15
3b = 7.85
b = 261.666666666... cents
So, a bagel costs (roughly) 262 cents.