Go from the tonic chord in the first melody to the Dominant chord in the second, then to the tonic in the second--don't know the chords or keys you are working with, but here is one way it would work, going from E minor to G minor:
Em / B7 / Em / D7 /Gm /D7 /Gm.....
If you are looking for a single melody note,pick a note from that chord that sounds good, or, better still, play an arpeggio of that chord--
Nothing wrong with figuring this all out by ear, but my advice to you is to figure out the keys and chords, because having them on hand saves an awful lot of grief when something doesn't sound quite right.