Given a digraph $G$ and $f, g : E(G) \mapsto \mathbb{R}$, how would you find a cut $(X,\bar{X})$ with $s \in X$ and $t \in \bar{X}$ such that $\sum_{e \in \delta^+(X)}{f(e)} - \sum_{e \in \delta^-(X)}{g(e)}$ is minimized?
$\delta^+(X)$ is the set of edges going out of $X$ and $\delta^-(X)$ is the set of edges going into $X$.
I can solve for the case where $f = g$, simply by constructing a network flow graph with all edges adjacent to either $s$ or $t$. Since $\sum_{e \in \delta^+(X)}{f(e)} - \sum_{e \in \delta^-(X)}{f(e)}$ can be rewritten as $\sum_{e \in \delta^+(X)}{f(e)} + \sum_{e \notin \delta^-(X)}{f(e)} + constant$ then a graph can be constructed with an edge between $s$ and all $v \notin \{s,t\}$ with capacity equal to $\sum_{e \in \delta^-(v)}{f(e)}$ and an edge between all $v \notin \{s,t\}$ and $t$ with capacity equal to $\sum_{e \in \delta^+(v)}{f(e)}$. Then dealing with negative $f$ is simply a matter of adding the capacity to the $(v,t)$ edge instead of the $(s,v)$ edge and vice versa.
However this solution does not work when $f \neq g$ and I can't come up with an answer for this case.