You don’t even need to have both people need tax deductibility, all you need is comparative advantage. Suppose we both want to donate $100, but to different charities, and donations to my charity are not tax deductible in my jurisdiction, but both are in yours. And suppose my tax rate is 20%. If I instead give $100 to your charity and $10 to mine, and you give $90 to my charity, then both charities still end up with $100, but you’re only out $90. I’m out $110, but $100 of that is tax deductible, so I get $20 back, so I’m out $90.
You don’t even need to have both people need tax deductibility, all you need is comparative advantage. Suppose we both want to donate $100, but to different charities, and donations to my charity are not tax deductible in my jurisdiction, but both are in yours. And suppose my tax rate is 20%. If I instead give $100 to your charity and $10 to mine, and you give $90 to my charity, then both charities still end up with $100, but you’re only out $90. I’m out $110, but $100 of that is tax deductible, so I get $20 back, so I’m out $90.