Is putting a Draw 4 card on top of a Draw 2 card legal?
A common Uno variant allows the recipient of a draw 2 to avoid drawing (and being skipped) by playing their own draw 2.  The next player either needs to skip their turn and draw 4 cards, or play their own draw 2.  If they play their own, the next player must either draw 6 cards or continue the sequence.  Some variants allow similar behavior with draw 4 cards.

Assuming you're talking about this "stacking" draw cards, you aren't going to be able to get an official answer, because it isn't an official rule.  This would explain why you and your friend are both adamant about it working in different ways.  You're just going to have to come to an agreement on how you will play.

For what its worth, every place that I've seen this rule described you have to play the exact same card, so you cannot "stack" a draw 4 when receiving a draw 2 in order to make the next player draw 6.  So I expect that is the more common way of playing the variant.