You can immediately deduce that your answer cannot be correct by considering some further examples. By your logic, a decrease in price of 5 dollars is always equivalent to a decrease by 5 percent of the price. But let's follow that through to its logical conclusion and look at what a "5% discount" would be with a different initial price - if the original price was $5, then the price after a "5% discount" would be $0. Does that make any sense? Is it true that 0 dollars is 95% of 5 dollars? Your error here is assuming that 5 dollars is the same thing as 5 percent of the cost. This is only true if the initial cost happens to be $100 (once you solve this exercise successfully you should see why this is the only time your "rule" applies).
One way to think about it might be to consider an easier example you already know the answer to and extrapolate from there. Suppose the item cost $10 initially and you got a $5 discount, making the new price $5. Surely you would agree that this means you paid half as much. But how did we know that? Well, we looked at how much we paid ($5) and divided by the initial cost ($10) to see that \(\frac{\$5}{\$10} = \frac{1}{2}\) = "one half." From there, we can use what we already know - one half is the same as 50%. But, again, it's only natural to ask, how did we know that? Well, we used the definition of percent, meaning per hundred, and found an equivalent fraction:
\(\displaystyle \frac{1}{2} = \frac{1 \cdot 50}{2 \cdot 50} = \frac{50}{100} = 50\%\)
Now what would happen if we used this exact same logic on a different problem, where the initial cost was $30 and the discount was $6? The discount we got was:
\(\displaystyle \frac{$6}{$30} = \frac{\left( \frac{\$6}{\$6} \right)}{\left( \frac{\$30}{\$6} \right)} = \frac{1}{5} = 20\%\)
I'll leave it to you to try the problem you were given, but now that you know the basic process, you should do fine.