After arriving at the Khan camp there are numerous options for freeing her.
The player can simply kill every Khan on the map and liberate Tandi from her cell (this usually secures the good ending for Shady Sands as well, wiping out the raider menace). Fighting all of the raiders is a challenge. Having Ian is recommended, as is having a good rifle or SMG and a combat skill at 100%, in order to be able to fight the enemies effectively. Tandi will participate in combat if the door to her cell was unlocked. Obviously, she needs to be kept safe.
Garl can be challenged to single combat. The player fights him without his gear, while Garl totes a metal armor. Winning requires knocking him out or killing him - the player loses only by dying. In return, they receive Tandi and everything Garl had in his inventory. The raider leader disappears from the camp afterwards.
The player can barter for Tandi through the Barter interface. Her price will range between $400 and $1100, dependent on the player character's Charisma and Barter. Leaving the Barter interface without buying her will cause the Khans to attack.
The player can threaten Garl into surrendering her with Speech 45% ("I represent a threat you don't even understand. Do you really want to risk our wrath?")
Stealthy characters can activate Sneak, unlock her cell, talk to Tandi, and then sneak out.
Finally, male characters with 9 Luck or more have a 50% chance that they will be recognized as Garl's long-dead father. The Khans will panic, allowing a character with 6 Intelligence to leverage the situation. If they pass a Charisma or Speech check, they will receive Tandi.
Securing Tandi will net a 500 experience point reward, minus 50 experience points for every dead raider. She becomes a temporary party member, though she has no skills of note. Dropping her off at Shady Sands concludes the quest with 400 experience points.
Completing this quest turns the Khans permanently hostile.
PC As the game does not scan bags and back packs when removing temporary items, the player can acquire Tandi's head (or, well, her representation) permanently by buying her and placing the head in their container in the Barter interface. Doing so will not turn Garl hostile, but will not release Tandi either. To do so, the player has to talk to Garl with the head in their regular inventory. She will be released and the head item will remain in inventory.