hi! not qeresi, but the decisions affecting Yekbun's outcome are related to who you alert about the assassination attempt (and i believe to some degree the security measures you choose for the coronation? obviously ask for extra security). choosing to alert everyone gives you the best outcome - if i remember correctly - whereas keeping the assassination hidden gives you the worst outcome.
whether you keep the prisoner in the palace or in the town has a similar do-this, this-happens impact, but unrelated to yekbun if moved to the town.
there's a comment somewhere that shows what someone did step-by-step for their preferred outcome. https://qeresi.itch.io/a-tale-of-crowns/comments?before=274