The second parity can be structured with a custom struct (output or metadata). As long as the first party is only the one providing funds, that will pay all the fees. Bitcoin blockchain don't support splitting fees. But splitting fees are the most important in your case, we can adjust it manually by controlling inputs and outputs of the transaction. I think you can practice with bitcoinjs-lib which is the library for Bitcoin PSBT, addresses, etc.