It's done on the buyer's side, the seller company's partners get buyer's stock instead.
It's not "your baby for theirs", it's more complicated
How so? Use the baby analogy (as it was indeed Baker's child), what was it in this case in your view?
And you're potentially getting a stock with more potential than the ones you have (which are most likely going away).
And most stock are not materialized as a physical certificate, so it's mostly "on paper" (and on controlling power of course)
It's done on the buyer's side, the seller company's partners get buyer's stock instead.
It's not "your baby for theirs", it's more complicated