Here is how I did it, though it' same a bit wrong, simply because I realized too late what and how to do... I only developed the Necromancer castle, searched everywhere and everything, then handed the army over to the Empress (she has a dimensional door), portaled to that island, took out the guy in the castle, portaled back, entered the Tower, freed the weirdo, and led her to the Necromancer castle.
But I think the correct way is this: you gather troops, and when you're ready—but still within the time limit—you take the girl and lead her to the Necromancer castle; meanwhile, that hero should come out of the castle and portal to you, you knock him out, bring the girl to the castle, and mission complete :)