Question 631377
This assumes that the substance is 
decreasing at a linear rate ( straight line ).
The rate of decrease is 
{{{ -20 / 8 = -20/8 }}}
{{{ -20/8 = -5/2 }}} grams/day
----------------
Let grams of substance remaining = {{{ S }}}
Let {{{ d }}} = days since the purchase
{{{ S = -(5/2)*d + b }}}
{{{ b }}} is the grams present when {{{ d = 0 }}}, so
{{{ b = 40 }}}
{{{ S = -(5/2)*d + 40 }}}
Two weeks after purchase is 14 days
{{{ S = -(5/2)*14 + 40 }}}
{{{ S = -35 + 40 }}}
{{{ S = 5 }}}
There are 5 grams remaining after 2 weeks
Here's the plot:
{{{ graph( 400, 400, -2, 20, -2, 50, -(5/2)*x + 40 ) }}}