the discount price of a hat is $18 what is the regular price

no idea -- probably something more than $18 though ...

If the discount is x% then 18/(1 - x/100)