The baker and cup bearer were put in jail for displeasing the king.
The Pharaohs dreams
Joseph tells the cup bearer he will get his job back. He tells the baker that he will be killed.
The interpretation (again)
Like Joseph said, the cup bearer got his job back while the baker died.
Stocking up
The Pharaoh had dreams that he could not understand and needed it to be interrupted
The Pharaoh ask all the wise people what his dream could have meant but only Joseph. Joseph told him that the dream meant there would be 7 good years and 7 bad years.
The Pharoah put Joseph in charge of stocking up food for the 7 years of famine.