Question 888320
Not being very algebraic, the thought of 12 or 24 comes in to mind.  The "5 pieces of cake" does not make sense if the cake is divided uniformly to share among four friends equally.


First friend, 2/3 of the cake remains.


Second friend took some cake, {{{2/3-1/3=4/6-2/6=2/6=1/3}}} cake remains.


Third friend took 1/3 of 1/3, so {{{1/3-(1/3)(1/3)=3/9-1/9=2/9}}} cake remains.


Fourth friend took "his fair share" but this is unclear.  Five pieces remain.


If w = number of cake pieces, x = number of fair share pieces, then {{{(2/9)w-x=5}}}.   This is the best process I can give.  Recall, I said something about "5" mentioned as a possible factor or denomination?  There is also a denomination of 9.