Suppose the cards started as A, B, C, D and E in that order. Jack then hands over A, puts B on the bottom, hands over C, puts D on the bottom and hands over E. The cards are then in the order BD, so B is placed on the bottom and D is handed over.
This means I receive the cards in the order A, C, E, D, B. This is in order, so A is the Ace, C the 2, E the 3, D the 4 and B the 5. Hence, the original order was Ace, 5, 2, 4, 3.
This problem is taken from the UKMT Mathematical Challenges.