Even so, what happens if the "kidnapper" just executes the prisoner? The war should go on? And what would be your new "reward" should you win? That kind of stuff can have many answers and at this point we should think of one which is programmatically easy to implement and fun/accurate to the game.
There are several possibilities...
(1) You send the Ultimatum
1.1 Ultimatum accepted - Release prisoners - small prestige lost for, small gain for you - both relationship boost
1.2 Ultimatum rejected - WAR - Target province -> kidnappers capital
- If you succesfully siege his capital (location of the dungeon) you automatically free the hostages.
- If you win through war score (battles etc.) he must release the captives -> some small reparations in form of $$$ and medium prestige bonus - or execute them -> WAR OF REVENGE
1.3 Ultimatum rejected and captives executed -> WAR OF REVENGE
If you win the Revenge war - the kidnapper is in your hands, your free to execute or imprison him - prestige gain and $$$ for you - if the kidnapper is also your vassal - execute or imprison and free titel revocation