Solution:

The answer is very simple. All she had to do is take the fifteen cards from the top and reverse them. This would make another pile out of that and there will be two piles - one of 15 cards and one of 37 cards. Also both of them will have the same number of inverted cards.



Just think about it and if the mathematical explanation will help you understand better, here it is.

Assume that there were p inverted cards initially in the top 15 cards. Then the remaining 37 cards will hold 15-p inverted cards.

Now when she reverses the 15 cards on the top, the number of inverted cards will become 15-p and thus the number of inverted cards in both of the piles will become same.