It is 2 out of 3 times, and he should ask at the end of part 3 (after bombing, in your case). Saving the spy counts, so, it you scared both sides with a fear potion in part 2, it should be enough.
Peace is possible with every choice btw, and , if you do, Thane joins the tavern regardless of if he asked here or not, it just changes where he is during the war.