Abram and Lot and Sarai (very rich from the prostitution racket) came out of Egypt and moved back to the very place where god had sent Abram earlier. I'm assuming the famine was over at this time.
Living close together, Lot and Abram's huge flocks probably got a little confused and there were quarrels between the shepherds.(My sheep! No! My sheep!) So Abram told Lot to find some other place, he didn't care where. You take the low road, I'll take the high road and all that jazz.
Lot saw the plain of Jordan and decided to take that for himself. The description of the land is that of a paradise. This was before Sodom and Gomorrah were destroyed, according to the author, so Lot pitched his tents near Sodom. Abram stayed in Canaan.
There is a strange aside where the author wishes us to know that "the men of Sodom were wicked and were sinning greatly against the Lord." Ah, we're supposed to shake our heads and say, those rascals. What were they doing? Was it just the men? Who else was there? What about Gomorrah?
That's all there is. The author says that when Lot leaves, god tells Abram that all the land he sees will be his, and his offspring will be many--even though his wife is barren, I suppose. So Abram moved his tents near some big trees and built another altar. (Altar 3.)