What all 4 took must be all the berries in the bowl....call this N
Billy took (1/2)N + 2
Bob took (1/3) [ (1/2)N + 2 ] + 2
Joe took (1/3) [ (1/3) [ (1/2)N + 2 ] + 2 ] -1
Mom took 1
So we have this rather convoluted equation
[ (1/2) N + 2 ]+ (1/3) [ (1/2)N + 2 ] + 2 + (1/3) [ (1/3) [ (1/2)N + 2 ] + 2 ] -1 + 1 = N
Because this is a little tedious ( but not impossible) to solve, I'll get a little help from WolframAlpha
N = 20
Billy took (1/2) (20) + 2 = 10 + 2 = 12
Bob took (1/3) of what Billy took + 2 = (1/3)12+ 2 = 4 + 2 = 6
Joe took (1/3) of what Bob took and put one back =(1/3)(6) - 1 = 2 - 1 = 1
And Mom took 1
And 12 + 6 + 1 + 1 = 20 berries in the bowl originally