Say you have two tax brackets:
$0 - $100: 10%
$101 - $200: 15%
If you make $150, the entire $150 is not taxed at 15%. The first $100 is taxed at 10%, and the remaining $50 is taxed at 15%.
This is why being in a higher tax bracket is never (edit: usually not) a bad thing - you can't net less than you would have in the lower bracket.
For example in my country the amount you can deduct on health/education expenses depends on the bracket you are placed in.
It's a bad thing if you could defer realizing that higher-bracket income to a low-income year.
For example if the person in your example made $105 and gave $5 to charity and brackets worked the way the common misconception worked that would reduce their taxes from $15.75 to $10, saving them $5.75 in taxes which is indeed more than their $5 donation, and they do indeed come out $0.75 ahead of where they would have been had they not donated.
In reality, taxes without the donation would be $10.75 and the donation reduces taxes to $10, giving them a tax saving of $0.75 for their $5 donation, leaving them $4.25 behind where they would have been had they not donated.
Note: there may be other tax consequences besides the deduction for the donation itself for some charity donations that also provide benefits, which might make a donation a net monetary gain for the donor.