Question 1041564
Let {{{ x }}} = number of pennies David put in jar
After Alice takes {{{ (1/3)*x }}}, there are
{{{ (2/3)*x }}} pennies left
Bret takes {{{ (1/3)*(2/3)*x }}}
There are {{{ (2/3)*(2/3)*x }}} left
Carla takes {{{ (1/3)*(4/9)*x }}}
There are {{{ (2/3)*(4/9)*x }}} left 
----------------------------
Given:
{{{ (8/27)*x = 40 }}}
{{{ 8x = 27*40 }}}
{{{ 8x = 1080 }}}
{{{ x = 135 }}}
David put 135 pennies in the jar
-----------------------------
Check answer:
Alice took {{{ (1/3)*135 }}}
There are {{{ (2/3)*135 = 90 }}} left
Bret took {{{ (1/3)*90 }}}
There are {{{ (2/3)*90 = 60 }}} left
Carla took {{{ (1/3)*60 }}}
There are {{{ (2/3)*60 = 40 }}} left
OK