After telling Abraham and Sarah that they would be parents in one year, God turns to leave and contemplates whether to tell Abraham what He is about to do to Sodom and Gomorrah. Other than the fact that Lot lives in Sodom, why should God inform Abraham about the judgment to come? It may have more to do than just with Abraham’s nephew Lot.
If you remember, Abraham went to war against the four kings that took all of Sodom in captivity. He victoriously brought them back to the King of Sodom. And the king tried to bless Abraham because of it. But Abraham refused to take any spoils of the war.
Abraham knew the people of Sodom. His nephew Lot lived among them. He fought for them and restored them. And now God was going to destroy them.
There is also the fact that Lot had a lot of herdsmen and servants in his household. The two separated because their households were too large to live together anymore. Maybe that is why Abraham started with the number 50 when asking if God would spare the city if there were 50 righteous people in it. Could that be how many were in Lot’s household? Or maybe Abraham was hopeful that after saving Sodom and standing up for God being the source of his blessings that some in the city would want to follow the God of Abraham. And remember, Lot was not with Abraham for the covenant of circumcision. Maybe Abraham was worried that God wouldn’t spare Lot because Lot wasn’t part of the covenant.
Regardless of Abraham’s reason for trying to spare Sodom, God chooses to tell Abraham about His plan for Sodom because Abraham is a faithful servant. And Abraham feels compelled to inquire of the Lord how many righteous people it would take to spare the city. He stops at the number ten. Whether Abraham stopped at that number because he feared even Lot wouldn’t be among the righteous or because God walked away before Abraham inquired further is unknown. But at the end of the conversation, God leaves, and Abraham returns to his place.
The two angels had already left to go to Sodom and bring destruction upon it.
For reference, the oaks of Mamre are in Hebron, as it says at the end of chapter 13. Hebron is south and west of Jerusalem at an elevation of around 3,000 feet. Sodom is across the Jordan River from Jericho in the valley on the east side of the Dead Sea at about 900 feet below sea level. It would be possible to see the whole valley east of the Dead Sea from where Abraham stood.