Answer:
First we estimate the percent's. 8.5% - 10%, 18% - 20%. Then we do the equation. If you add percent's you get 30% multiply that by 40 and you get 12. Add that to you problem and you get $52.
Explanation:
Since the tax and gratuity were 4 and 8 dollars you can just add those up to the 40, but I did it another way.
This is the sample response if you want a better explanation.
The gratuity is about 20% of $40, which is $8. The tax is about 10% of $40, which is $4. So, the total cost is about $40 + $8 + $4 = $52.