Question 969459
He began with 44 coins.

He started with x coins.


He gave away (x/2) +2,  subtracted from x, leaves him with (x/2)-2

Second person gets half of that, which (x/4)-1+2=(x/4)+1

Now he is left with the difference, which is (x/4)-3

He gives away half of that (x/8)-3/2+2=(x/8)+(1/2)

He had (x/4)-3  and he gave away (x/8) +1/2.  When you subtract, (x/4)-(x/8)=(x/8)  And -3 -1/2=-(7/2)

He is left with (x/8)-(7/2)=2   because he has two coins left.

Multiply everything in the equation by 8 to clear fractions.
x-28=16    (7/2)*8=28
Add 28 to both sides.

x=44 coins.

Gives away half (22)+ 2 and has given away 24.  He has 20 left.

He gives away half (10) +2 or 12, and he has 8 left.

He gives away half (4) plus 2 or 6, and he has 2 left.

Don't let the fractions of coins, or what appear to be fractional coins worry you.  Just keep working it out and see what happens.