Joseph is off in Egypt. He started as a slave but now it's gotten worse: he has been whisked off to prison for allegedly assaulting Potiphar's wife. He's an innocent man, but that does not stop the legal system from letting him languish in jail.
While he's there, though, he makes the best of his bad situation. Joseph steps up to take care of his fellow prisoners, God grants him grace in the eyes of the prison warden, and Joseph becomes one of the top leaders in the prison. It should be clear that 2nd millenium BC Egyptian prisons and the rules about them were quite different from anything modern, so be careful about applying an understanding of "impossible" to this.
While he is in this role, Pharaoh gets angry at his chief cupbearer and his chief baker. So, both are sent to the prison that Joseph is both in charge of and imprisoned in. Joseph is made responsible for them, and they are in captivity for an undisclosed amount of time. Now, a few words are due here: 1.)Pharaoh is not a name, it's a title. It's basically the Egyptian word that one would translate as "King" these days. Although, around Joseph's time, it also was applied to the ruling household. 2.) We do not have a hard lock on which Pharaoh of Egypt we are dealing with here. 3.) The prison warden wants these two prisoners handled delicately because Pharaoh may turn them loose any time. 4.) If Potiphar could imprison Joseph without trial, Pharaoh certainly can--and for far less of a crime. We do not know what they did. Both of them were involved in food service. They could have gone to prison for letting the potato salad go bad.
These guys have dreams. Not the "I have dreams for my future" kind but the "I have dreams of my future" kind. However, they do not know what these dreams mean.
Joseph, however, takes note of their situation. He knows something is wrong, but not quite what. So he does the logical thing: he asks them. They tell the story of their dreams, Joseph interprets them, and then they come to pass.
The cupbearer, though, does not follow through with Joseph's request. Perhaps he was just so busy he forgot, but "remember" is often used in a specific sense when dealing with kings. It's about deliberately making the king aware of a person or event--and the cupbearer perhaps fears his own situation is too tenuous to risk in pointing out Joseph's situation.
Now, what do we do with this?
The biggest lesson that I think we should grab hold of here is that people matter. Joseph noted the distress of his fellow prisoners. The warden knew his two special prisoners needed care, and knew who to entrust them to.
How well do we engage with people? Are we aware or do we live in the frustrations that have surrounded us? I'm sure that, in his human nature, Joseph had bad days that he mainly thought about his own problems. But that wasn't the way he lived all the time. What about us?