This example looks like another similar or identical one solved about a week ago.
COFFEE PRICE QUANTITY COST
A 14.99 a 14.99a
B 13.99 b 13.99b
C 10.39 2a 2*10.39a
TOTALS 51
Avg. 12.61
Form two equations in the unknowns a and b:
Simplify and solve the system.
simplified system.
If choosing substitution of b, then:
and you can solve for b and for 2a, and should check that the solutions work.
.
.