sn The Hebrew term cupbearer corresponds to the Egyptian wb’, an official (frequently a foreigner) who often became a confidant of the king and wielded political power (see K. A. Kitchen, NBD3248). Nehemiah held this post in Persia.
sn The baker may be the Egyptian retehti, the head of the bakers, who had privileges in the royal court.
sn The Hebrew verb translated offended here is the same one translated “sin” in 39:9. Perhaps there is an intended contrast between these officials, who deserve to be imprisoned, and Joseph, who refused to sin against God, but was thrown into prison in spite of his innocence.