Under the Code, sufficient mutuality for offset of pre-petition monies mutually owed cannot be created by contract in a triangular offset; the claim on the funds is a personal one, and one tied to the identity of the claimant.
The second party also can't transform the contract into a claim.
(Perhaps. We don't know many things, but we especially don't know Patent and Bankruptcy. Entertainment value only, folks.)