The novelization made it more clear that Yoda voluntarily withdrew from the duel. He realized that the Sith had changed with the times in a way that the Jedi hadn't, and fighting them on their own terms wasn't going to work. He needed to be retrained by Qui-Gon and eventually pass that new training on to Luke--who finally brought an end to the conflict by refusing to fight and choosing to willingly sacrifice himself, which in the end brought about Anakin's return/redemption. Killing either Vader or Palpatine would have just continued the pattern of the Sith, but Yoda helped Luke to learn that "a Jedi uses the Force for knowledge and defense, never for attack." I think that is the lesson that Yoda learned Thatand passed on to the new generation of Jedi, starting with Luke. Engaging your enemies on their own terms ultimately prolongs the conflict as violence begets violence. That's what happened with the Clone Wars--the Jedi became so immersed in fighting that it consumed them and almost brought about their destruction. In the end, Luke refused to fight and the Sith destroyed themselves.