I'll wager the accounting for the two contracts is separate. There may be stipulations that connect the two, but the payment from Google to Apple of $20B+/yr is a long-established contract (set of contracts, actually0 that Apple would not jeopardize for the relatively small Google to Apple $1B/yr contract, one still unproven and which may not stand the test of time.
So, yes, practically speaking, the Apple to Google payment offsets a tiny fraction of the Google to Apple payment, but real money will change hands for each and very likely separately.