1 answer
(click or scroll down)
He can use the $340$-gram bag of ground coffee for $17$ days before he buys a new bag.
This can be found by solving the equation:
$18.75d = 340 - 40$
$18.75d = 300$
$d = 300/18.75 = 16$
Since we can't have a fraction of a day, he can use the bag for $17$ days.