Let x be the cost of one candy bar
Let y be the cost of one drink
Setting up system of linear equations from the given:
2x+10y=14.00
18x+20y=38.50
Solving the system of equations by elimination:
(-2) 2x+10y=14.00 (-2)
-4x-20y=-28
18x+20y=38.50
14x=10.50
x=10.50/14
x=0.75
Cost of one candy bar = $0.75