Question 11602
Let x = the original number of jelly beans in the jar before the pilfering began.

After Michael has pinched his third, the number left is:

{{{x - (1/3)x = (2/3)x}}}

After Tanya's sampling, the number left is:

{{{(2/3)x - (1/3)(2/3)x = (6/9)x - (2/9)x}}} = {{{(4/9)x}}}

Finally, after Brian has helped himself to one third, there are 40 jelly beans remaining:

{{{(4/9)x - (1/3)(4/9)x = (12/27)x - (4/27)x}}}

{{{(8/27)x = 40}}}  Multiply both sides by 27.

{{{8x = 1080}}} Divide both sides by 8.

{{{x = 135}}} There were 135 jelly beans in the jar before the crime.

Check:

{{{135 - 135/3 = 135 - 45}}} = 90
{{{90 - 90/3 = 90 - 30}}} = 60
{{{60 - 60/3 = 60 - 20}}} = 40