We make much of Abraham's negotiation with God. You remember that strange encounter with the LORD when He said, "Shall I hide from Abraham what I am about to do?" and reveals to Abraham that He was about to destroy Sodom where is his nephew Lot lived with his family. Remember how Abraham argued that God would surely not destroy the righteous with the wicked. What if there are fifty righteous men in the town? Far be it from You! Shall not the Judge of all the earth do right?
God seems to back down as Abraham wheedles concession after concession out of Him and beats Him down like a second hand car dealer to just ten righteous people. I reckon that Abraham was calculating that Lot and his wife and two daughters made four. It was likely that the girls had boy-friends by now, so if you counted them and their respective parents there were likely to be ten.
In the end Sodom turned out to be worse than anyone suspected. Lot and his two daughters were saved, but no-one else. Even Lot's wife hankered too much after the sins of Sodom. So it turned out that God's original plan was accomplished. Sodom was destroyed. So what was all that negotiation about? It seems to me that it was all about Abraham approximating himself to God's will.
Later on Abraham would be more severely tested. At stake would not be the life of his nephew, but the life of his son - and not just any son; the son of promise. Out of Isaac would come many nations; yet Abraham trusted God. The letter to the Hebrews tells us that Abraham reasoned that God could raise the dead - so he had no compunction in offering his son as a sacrifice.
What transformed Abraham from a man who wanted to stay God's hand from destroying a wicked city to save his foolish nephew to a man who was willing to trust God to do the right thing even if it amounted to sacrificing his own son? It can only be a lifetime of prayer. A lifetime of listening to God and learning about His wisdom and justice.
Is this what prayer is meant to do for us?