The discount is 5% that means you find 5% of 30 and take from 30 (5/100)*30 = 1.50 dollars 30 - 1.50 = 28.50
Now you put the tax on
28.50 * 1.05 = 29.93 Notice 2 things. multiply by 1.05 will put on a the sales tax plus the cost of the item (a short cut) and taking off 5% does not come to the same thing when you add the 5% back on which is the point of the question.