Okay, so I spent about an hour and a half coming up with the following mock-up. It's far from perfect but it will illustrate my thought process regarding how I handle layers like these.
Quick note: I always use pure magenta (#FF00FF) as the "see-through" colour so when putting the layers together, you have to make sure that this magenta is removed. Also, I was lazy here and simply used black to mask off the parts of the map that are never visible. Normally, I'd use some other colour but as I said, this is a quick mock-up.
Quick note 2: I didn't take care to check all that much here, but know that almost all 2D games up until more recent and much more powerful systems will use tiles that are multiples of 8 pixels in length and height. This means that ideally, you should make sure that each layer has an height and length that are multiples of 8 pixels. I tried to ensure this here but again, quick mock-up!
First off, the middle layer, which here is the actual stage where you and the enemies are located, is the main one so all the other layers have to be adjusted to fit it. At a quick glance (because I didn't make any calculation), the background layer seems to move at half the speed of the middle one, and the foreground one seems to move twice as fast. These ratios are important when editing a layer to make it fit another. Here, I assume the middle layer is complete and correct so I didn't touch it apart from very approximately outline the visible area with black.
Second, the background layer. Since it moves at half the speed of the middle one, even if you managed to capture it in its entirety, you'd still have to nearly double its length to make it fit. When editing or extending a layer, try to use specific points where the layer itself changes as an anchor point, and in this case, I've decided to use the spot where water stops and is then replaced by grass. I then aligned this part horizontally with the spot in the middle layer where the water stops, and then extended the background in both direction. I also had to move the part with more foliage on top and extend that part too in order to fit the section of the stage where you can go upward on the dead tree. I extended the top canopy to the left since that part appeared on screen already this high, but when extending on the right, I kept the part at the end where the foliage goes down since it's obvious that part was supposed to be seen (the graphics don't just cut off like on the left).
Third, the foreground layer. I'd say beforehand that foreground layers tend to make maps more difficult to understand as they hide parts of it, so don't be afraid to exclude it from your map if it makes it less readable. Since this one moved twice as fast as the middle layer, you basically have to cut it in half to make it fit. Again, use specific points where changes occur to decide how to make your edits. In this case, the trees stop appearing once you reach the swamp and the dead tree, and then they reappear along with the jungle trees until near the end. The easiest way to edit in this case is to take both tree portions and try to cut down their sizes in half. The first one you can simply omit the first half and align it so the trees stops a bit before the swamp. The second tree portion is harder since it has both a beginning and an ending, so when editing try to remove repeating portions or, like I did, start cutting at points where you can see small tears in graphics where tiles don't connect naturally to one another (check out the vines). I basically removed a bit less than half of it and then aligned that portion with the second jungle part.
And that's it for the most part. I hope I'm making myself understandable but it there are points where I'm not being clear enough, feel free to say so.