the regular price is 3.18.
50% off half the price, so you can either divide the regular price by 2 or multiply it by 0.50
3.18 / 2 = 1.59 ( 3.18 *0.50 = 1.59)
so the sale price is 1.59
now subtract the sale price from $5 to find the amount of change they got back:
5.00 - 1.59 = $3.14 change back