Yusuf is Rescued from the Well and sold as a Slave
Allah tells;
وَجَاءتْ سَيَّارَةٌ فَأَرْسَلُواْ وَارِدَهُمْ فَأَدْلَى دَلْوَهُ قَالَ يَا بُشْرَى هَـذَا غُلَمٌ
And there came a caravan of travelers and they sent their water-drawer, and he let down his bucket (into the well). He said;"What good news! Here is a boy."
Allah narrates what happened to Yusuf, peace be upon him, after his brothers threw him down the well and left him in it, alone, where he remained for three days, according to Abu Bakr bin Ayyash.
Muhammad bin Ishaq said,
"After Yusuf's brothers threw him down the well, they remained around the well for the rest of the day to see what he might do and what would happen to him. Allah sent a caravan of travelers that camped near that well, and they sent to it the man responsible for drawing water for them. When he approached the well, he lowered his bucket down into it, Yusuf held on to it and the man rescued him and felt happy,
بُشْرَى هَـذَا غُلَمٌ
(What good news! Here is a boy)."
Allah's statement,
وَأَسَرُّوهُ بِضَاعَةً
So they hid him as merchandise,
Al-Awfi reported that Ibn Abbas commented,
"is in reference to Yusuf's brothers, who hid the news that he was their brother.
Yusuf hid this news for fear that his brothers might kill him and preferred to be sold instead.
Consequently, Yusuf's brothers told the water drawer about him and that man said to his companions,
بُشْرَى هَـذَا غُلَمٌ
("What good news! Here is a boy"), a slave whom we can sell. Therefore, Yusuf's own brothers sold him."
Allah's statement,
وَاللّهُ عَلِيمٌ بِمَا يَعْمَلُونَ
And Allah was the All-Knower of what they did.
states that Allah knew what Yusuf's brothers, and those who bought him, did. He was able to stop them and prevent them from committing their actions, but out of His perfect wisdom He decreed otherwise. He let them do what they did, so that His decision prevails and His appointed destiny rules,
أَلَا لَهُ الْخَلْقُ وَالاٌّمْرُ تَبَارَكَ اللَّهُ رَبُّ الْعَـلَمِينَ
Surely, His is the creation and commandment. Blessed is Allah, the Lord of the all that exists! (7;54)
This reminds Allah's Messenger Muhammad, that Allah has perfect knowledge in the persecution that his people committed against him and that He is able to stop them. However, He decided to give them respite, then give Muhammad the victory and make him prevail over them, just as He gave Yusuf victory and made him prevail over his brothers.
Allah said next