Sorry my answer was wrong so I just edited it sorry
Do you know the equation to use
16 days is a part of 3 weeks, so $2500 x 3 = $7500. if he spends $380 per day for 16 days, that equals $6080. so subtract $6080 from $7500 and you get $1420 (how much he has left)
The tangent to
has slope
, where

By the chain rule, we have

and by the product rule,


so that with
, we get

The tangent line is horizontal when the slope is 0; this happens for

where
is any integer. In the interval
, this happens for
, or

i.e at the points

and
