פַּרְעֹ֖ה קָצַ֣ף עַל־עֲבָדָ֑יו וַיִּתֵּ֨ן אֹתִ֜י בְּמִשְׁמַ֗ר בֵּ֚ית שַׂ֣ר הַטַּבָּחִ֔ים אֹתִ֕י וְאֵ֖ת שַׂ֥ר הָאֹפִֽים׃
Фараон разгневался на своих слуг и посадил меня в палату дома капитана стражи, меня и главного пекаря.
Rashi
השיב על כני HE RESTORED UNTO MY OFFICE — he means Pharaoh who was mentioned before, where it is said (v. 10) “Pharaoh was wroth with his servants”. The phrase is elliptical not stating explicitly who restored, for it is not necessary to state explicitly who restored: obviously he who has the power to restore viz, Pharaoh. This is the ease with all elliptical sentences — they leave the matter indefinite as to who has to do the action (i.e. they omit the subject of the verb).
Siftei Chakhamim
Prison. I.e., משמר does not mean that he merely placed guards (שומרים) over them, for in v. 19 it is written יֵאָסֵר בבית משמרכם (imprisoned in your place of משמר). Rashi did not explain on 41:10 that משמר means prison because there it is clearly written in 40:3 that it was a בית הסוהר (jail).