In the above example, A, B, C, D is one chain and w, x, y, z is the other. They combine and then J1, J2, J3, J4 is the combined chain.
Since block "J1" has 2 parents, it commits to the state of the 2 legacy chains. If you have coins in each chain at D or z, then you get coins in the joint chain.
They would both need to agree on what the rules are for their new chain. Since it is a (double) hard fork, they can do pretty much anything they want.
The combined chain could continue as before. It would be a combined chain and each user's coin total would be unaffected. The advantage of doing that is that it causes minimum economic disruption to users. The mining power for both chains would be applied to the joint chain, so they combine their security.
Alternatively, they could agree on an exchange rate. Users would be given joint-coins in exchange for their coins on the 2 legacy chains.
For something like Bitcoin Cash and Bitcoin, they could have a re-combination rule. 1 Bitcoin-Recombined = 1 BTC + 1 BCH. That doesn't seem very likely though and also there are more BCH coins than BTC coins.
It might be worth moving this to bitcoin-discuss, since it isn't really Bitcoin protocol discussion.