The peaches of the last two monkeys: B monkey (26-2)/2= 12 A monkey 12+2= 14.
Before "A returns to B five monkeys": [A monkey 14+5= 19] B monkey 12-5=7.
Because of "stealing half of Monkey B": [Monkey B 7*2= 14] Monkey A 19-7= 12.
Monkey B saw that Monkey A took too much, so he grabbed half of it. At first Monkey A was 12*2=24.
So at first the monkey took 24.