The first person to lose started with $39. The second person to lose started with $21. The third person to lose started with $12.
We can solve this problem by working backwards. After a victory, a winner has double what they started with. As all of the money given to the winners comes from the loser, the loser must have started with the sum of what they have after the game and half of what each winner has after the game.
Let’s label the players P1, P2, and P3, with P1 losing first, P2, losing second, and P3 losing third.
After the third game, we have
P1 has $24
P2 has $24
P3 has $24
As P3 lost, we know P1 and P2 doubled what they had from after the second game, and all of that came from P3. Thus, after the second game, we had
P1 had $24/2 = $12
P2 had $24/2 = $12
P3 had $24 + $12 + $12 = $48
Now, as P2 lost the second game, we know P1 and P3 doubled their totals, and all of that came from P2. Thus, after the first game, we had
P1 had $12/2 = $6
P2 had $12 + $6 + $24 = $42
P3 had $48/2 = $24
Finally, as P1 lost the first game, we know P2 and P3 doubled their totals, and all of that came from P1. So, the starting position was
P1 had $6 + $21 + $12 = $39
P2 had $42/2 = $21
P3 had $24/2 = $12.
This is not from me, all credit goes to Seth Wax from Quora - https://www.quora.com/Three-people-play-a-game-in-which-there-are-always-two-winners-and-one-loser-The-loser-gives-each-winner-an-amount-equal-to-what-the-winner-already-has-After-three-games-each-has-lost-once-and-each-has-24-With-how.