Merging maps with different heights

You can't really. Maps are often built to different heights and heights can't be shifted, unless you do it manually and tediously...
On some of the maps I have merged in the past, I left room for a few map "blocks" between the maps if they weren't level to one another. This allowed me to create a mountain or something between the two maps and build a helix inside to allow the train to transition a huge amount of elevation in a small area. Google images of "model railroad helix" to better understand. You don't even need to disguise it if you have a good imagination or just ignore that area between the maps.
Those 'tween boards are one way to do it. If you get TransDEM, you can sometimes use that to raise or lower the terrain. Note the sometimes here. There are times when the program won't and errors out so you'll end up doing it the other way anyway.

I will say that after sometime you'll be pretty good at creating transitional scenery to a point where no one else will know you are going from one route to another. :)