Pharaoh was wroth with his servants
Not with all of them, but with the butler and the baker. Aben Ezra observes here, that Pharaoh was not the proper name of this king, but a title of office, and signifies the king; for it cannot be thought that the butler would use such freedom in his presence as to call him by his name: the true name of this prince, according to the eastern writers F6, was Rian ben Walid; others take him to be Aphophis, the third of the Hycsi, or pastor kings: but, according to Bishop Usher F7, his name was Mephramuthosis: and put me in ward in the captain of the guard's house:
in consequence of his wrath and displeasure, for crimes really or supposed to be committed by him; and the captain of the guard's house was a prison, or at least there was a prison in it for such sort of offenders; and this was Potiphar's, Joseph's master's, house: [both] me and the chief baker;
which explains who the officers were Pharaoh was wroth with, and who were for their offences committed to prison.