This refers to the cupbearer and the baker.
"In prison in him master's house." "His master" refers to Joseph's master, the captain of the guard.