31. At the time when Prophet Joseph was sent to prison, he probably was about twenty years old. This has been inferred from two statements in the Quran and the Talmud. The Quran (Ayat 42) says that....he remained in the prison for a decade or so and the Talmud says that ...Joseph was thirty years old when he was elevated to his honorable and trustworthy position.
32. One of the two prisoners, according to the Bible, was the chief of the butlers of the king of Egypt, and the other the chief of the bakers. And according to the Talmud, they were condemned to the prison because during a feast stone grits were found in the bread and a fly in the wine.
33. The fact that two prisoners attested his righteousness shows that Prophet Joseph was held in high esteem in the prison. Otherwise there was no reason why the two should have requested him alone to interpret the dreams and paid their homage like this: We have seen that you are a righteous man. It clearly means that the events narrated in the preceding verses had reached all and sundry and the people, inside the prison and outside it, knew that he had not been guilty of any crime or sin. On the other hand, he had proved himself to be a noble soul who had come out successful in the hardest test of his piety. So much so that there was not the like of him in piety, not even among their own religious leaders in the whole country. That is why not only the prisoners but also the officers and officials of the prison looked upon him as an honorable man and had full confidence in him. The Bible confirms this: And the keeper of the prison committed to Joseph’s hand all the prisoners that were in the prison; and whatsoever they did there, he was the doer of it. The keeper of the prison looked not to anything that was under his hand. (Gen. 39: 22-23).