Bumping for review and further discussion.
this will be relatively easy if we chose 4x as the amount he starts with as we know that we want to give the quarter of the amount he won in the first round to his friend.
at start he has 4x
we doubled that in first round so now has 8x ( so he won 4x ) and quarter of that is x , this x is waht he gives to his friend ...so he is left with ( 4x + 4x -x) = 7x
after second round 14 x after third round 28 x ....and he gives x+x+x = 3x to his frnd so left with 25 x
second case when he gives double of what he won to his frnd
at start 4x
he doubles it to 8x ...so half of what he won he gives to his frnd i.e 2x so end of first round he is left with ........8x - 2x =6x
after second round he doubles to 12 x and then aftewr third 24 x ..but he gives 2x+2x+2x to his frnd so he is left with 24-6 = 18 x
now 25x-18 x = 70
x = 10
so initial amount = 40