Here is how I would do it.
Let be a function which represents amount of oxygen at time in minutes.
Notice that is the rate of change.
Thus, .
The rate in is amount of oxygen coming in per minute is .
The rate out is .
Thus, with .