Math question need help

So my husband bought a 200 dollar gift card for 171 dollars. Then used the same 200 dollar gift card to buy a new gift card for 188 dollars. I told him that was stupid and he lost money. He is saying he didn't lose money because he got 212 dollars for 171 but. I said no you got 212 dollars for 188. He says no because he only spent 171 in cash. We have been talking about this all day who is right in your opinion?