39:21 - But while Joseph was there in the prison, the LORD was with him;
B) God granted Joseph favor in the eyes of his masters verses 3 and 21
39:3- When his master saw that the LORD was with him and that the LORD gave him success in everything he did, Joseph found favor in his eyes and became his attendant.
39:21 - he showed him kindness and granted him favor in the eyes of the prison warden.
C) God promoted Joseph, expanded his territory verses 4 and 22
39:4 - Potiphar put him in charge of his household, and he entrusted to his care everything he owned.
39:22 - So the warden put Joseph in charge of all those held in the prison, and he was made responsible for all that was done there.
D) God's blessings extend to the masters and they have nothing to worry about verses 5-6 and 23