Add the follwing line to the captives init line:
this addAction ["Secure Hostage", "rescue.sqs"]
Then you write a short sqs script (no need for fancy sqf scripting here) with the following content:
myCaptive join myPlayer
When the player is close enough, he will get the "Secure Hostage" option added to the action menu. The script will start when the player executes the action, and the captive jouns the player. Voila!
You may find more information about the addAction command in the COMREF.