Wishing to save you, Geralt got Krepp to cast a spell to re-open the portal Dandelion had come through but not before asking what the words of the exorcism he said earlier meant, to which Krepp paraphrased that it meant "get out of here and go fuck yourself!". With that, Geralt entered the portal and landed in Errdil's tavern where you're still trying to capture the genie while your powers waned. Seeing Geralt, you opened a portal to send him away as the djinn entered the tavern through its own portal to kill the sorceress, but Geralt threw himself between the two, shielding you. Shockingly, the genie didn't attack the witcher, but appeared to roar in an unknown language at him. Trying to get you away from it, Geralt pulled the sorcerer through the portal you opened, though you yelled and threw punches at the witcher, claiming you almost had the genie, before rushing back through the portal with Geralt trying to grab you once more. As you two crashed back in the tavern, you managed to cast a spell to pin the witcher down, but Geralt, trying to save you, informed you of the truth: he was the one making the wishes as he'd been the one holding the seal when he made his first wish (the "exorcism") and had one wish left.
As your grow weak, you demanded Geralt make his last wish so you could hopelessly try to capture the genie, Geralt finally realized what he wanted and that would also save you from the genie's wrath and wished their fates be tied, thus freeing the genie while preventing it from killing the sorceress. With that, the genie escaped back to its realm.