ויהי בשחת, אמר זה אחר שאמר וישכם וישקף להודיע כי בזכות אברהם הציל האל את לוט, כי אע"פ שהיה צדיק לא היה כל כך צדיק שינצל בזכותו, אם לא היה זכות אברהם. ועתה כשהיה משקיף על פני סדום ועמורה כדי שלא יפול לבו עליו עבור לוט בן אחיו הודיעו ה' שינצל. ויהי בשחת, the reason why the Torah phrases this thus is to remind us that Lot’s having been saved was due to the merit of Avraham. Even though, by comparison to the people of Sodom he was relatively righteous, he was not righteous enough to have deserved G’d extending Himself to save him as a result of his own merits. G’d now wanted to put Avraham’s mind at rest by indicating to him that Lot had indeed been saved from this conflagration.
מתוך ההפכה, קודם שבא ההפכה. וישלח את לוט מתוך ההפכה, He had sent away from the midst of this upheaval, i.e. immediately preceding it.
בהפך את הערים, בעת שרצה להפך שהרי אמר לו המלאך כי לא אעשה דבר עד בואך שמה: בהפך את הערים, when He was about to turn these cities inside out, for the angel had told Lot that he could not carry out his task until he had brought Lot to safety. (verse 22).