An exponential martingale is defined for a class of random walks in the positive quarter lattice which are associated with a wide variety of Markovian two-queue networks. Balance formulas generalizing Wald's exponential identity are derived from the regularity of several types of hitting times with respect to this martingale. In a queuing context, these formulas can be interpreted as functional relations of practical interest between the number of customers at certain epochs and the utilization of the queues up to these epochs.