Others have explained what will happen, but let me take a stab at explaining it.
Today:
GXY : $4.50 with 505,669,628 shares on issue. Market cap ( SP * SOI ) = $2,275,513,326
ORE: $7.98 with 344,158,072 shares on issue. Market cap ( SP * SOI ) = $2,746,381,414.56
If GXY or ORE were to merge today:
ORE ( or new coy ): Still at $7.98
Number of shares will be :
344,158,072 of existing ORE shares +
287,726,018 "converted" GXY shares ( = 505,669,628 * 0.569 )
= 631,884,090 shares on issue
Market cap : 631,884,090 * $7.98 = $5,042,435,038.20
So the new merged company ends up with a larger market cap ( basically very close to simply adding their individual market cap ).
BTW. As can be seen above, the merged entity at this point is no longer a $4B merger. It is now a $5B merger.