So my friends charecter we'll call him hellboy, has a problem. Part of his backstory is he had sold his soul for one night of pleasure and became hellbred. He realized the error of his ways and on his way to atone when he was killed. He managed to claw his way out of hell but without ownership of his soul. After we saved a town from total annihilation from an undead horde he was deemed worthy by the other gods he was able to get his soul back. (Also he's lawful evil but not in the traditional evil genius take over the world sense, more along the lines of I will bring order to this world at any cost kind of sense)
Skip ahead a month or so in game and we are on an island that and my necromancer accidentally created a grave knight(think lich with a phylactery as it's armor that is tough to destroy permanently one of the few ways is to drop it into a volcano) we killed it but it would regenerate eventually. Since we didn't have the means to destroy it quickly enough ourselves one of the few options trapped on a literally god forsaken island was use his lesser planar ally to summon something and get it to take this armor to the positive energy plane to be destroyed. So we perform the ritual and Baal shows up. One of the only things that he wants is to get hellboy's soul back. Longer story short we worded the contract poorly hellboy signed the contract not stipulating when Baal had to destroy the armor and didn't get Baal to sign the contract either in which case Baal took the armor for himself making him more even powerful. The only bright side is that the contract has to be prominently displayed in hell where hellboy has to collect the contract in order to get out of the deal.
TL;DR One of my party members made a deal with an archdevil we worded it poorly and it all went sideways what can we do to get his soul back again?