Melissa and her children went into a grocery store and she bought $7 worth of bananas and peaches. Each banana costs $0.40 and each peach costs $0.50. She bought a total of 15 bananas and peaches altogether. Determine the number of bananas and the number of peaches that Melissa bought.
Let x be the number of bananas bought. Then the number of peaches bought is 15-x.
We form an equation.
0.4x+0.5(15-x)=7
0.4x+7.5-0.5x=7
-0.1x=-0.5
x=5
She bought 5 bananas and the 15-x=15-5=10 peaches.