Lauren S. answered 11/19/19
Physics tutor with PhD Knowledge and Jr. High Teaching Experience
Let g be granola bars and y be yogurt.
Write two equations for person A and B for the total cost of their grocery trip with the number of corresponding items for granola bars and yogurt:
Person A: 10*g+6*y=18
Person B: 5*g+4*y=9.5
Two equations and two unknowns, so this is solvable. Multiply equation B by -2:
Person B: -10*g-8*y=-19
Add equation A and equation B to cancel out the g variable:
Person A: 10*g+6*y=18
Person B: -10*g-8*y=-19
---> 0*g-2*y=-1
Thus -2*y=-1, or y=0.5 or 50 cents each. Plug y = 0.5 into either equation to solve for cost of g (I'll use equation A):
Person A: 10*g+6*(0.5) = 18
Solving for g we have:
10*g=15 or g = 1.5, so the cost of the granola bar is $1.50.