To be honest, I'd keep the cash and not say anything about a check or a card, unless it was hidden or not easily visible, like a cookie jar filled with cookies, and there's a $100 in a baggie tucked in with them. Or taped to the bottom of a statuette or something. The person didn't care enough about the original gift to open it, or about what they're giving me to even repackage it, and thus I feel they've given up their claim to it.
I guess I don't see it as a legitimate mistake, like a real gold bracelet that's got mixed in with costume jewelry.
If I knew the original gifter, I'm torn about returning the money. On one hand, they've already given that money away and it's not theirs anymore. They may have given it with a specific use in mind, but if the original giftee was to immediately donate it to charity, spend it on whatever, or even burn it, it's really not their concern. As well, there's the hurt that their gift was given away unopened and the thought that went into was wasted and unappreciated.
On the other hand, maybe getting their money back would help them reevaluate their gift-giving in the future and prevent future snafus like this.