This is only true for the steady-state
configuration. If the problem were dynamic, the flux across a
position may vary as the system settles toward an equilibrium configuration.
The true diffusive flux would be -khqx where
h is the height of the hallway, but the height of the hallway is
constant so we can fold this into the parameter k. In problem #2,
the height changes, so we need to keep track of h(x).