For this case we can propose a rule of three and thus find the original price of the cap.
15% --------------> $2.70
100% ----------> x
Where "x" represents the original price of the baseball hat, that is, without offering a discount:

So, we have the original price of the baseball hat is $18
To find the answer we remove 15% of the total price and have:

Answer:
The full price of the baseball hat is $15,3