And they took him from the pit and cut his hair (Bereishis 41:12).
Rashi comments, Because of honor due the king. Had it not been for the honor due the king, would a person who had been in jail for so long not need to cut his hair?

Our Sages say, "Yosef left prison on Rosh Hashanah" (Gemara Rosh Hashanah 10a). If so, how could Yosef have had his hair cut on Yom Tov? This is why Rashi explains, Because of honor due the king. Based on the decision rendered by the Shach (Yoreh De'ah 198), it is permissible to cut one's hair on Yom Tov for a Mitzvah.

--Toras Moshe

And Paroh dreamt (Bereishis 41:1).
On the night that Paroh dreamt, the Angel Gavriel came to the prison and taught Yosef 70 languages because Yosef was destined to rule Egypt which in turn ruled over 70 countries. Yosef needed the Malach's help. The Malach added the letter "Hey" to his name, making it "Y'hosaif". He was told that he would appear before Paroh in the morning and Gavriel revealed to Yosef the interpretation of Paroh's dream.
--Torah Shleimah

And Paroh awoke and behold, it was a dream (Bereishis 41:7).
The verse should say "dreams" because Paroh dreamt two separate dreams: the dream of the cows and the dream of the sheaves. Although Paroh dreamt two dreams, since he didn't know their interpretation, they were considered like one dream. The Parsha recounts the dreams of the cows and sheaves three times: the Torah's narrative, Paroh's description to Yosef, and Yosef's interpretation to Paroh. 3 times 14 equals 42. Nothing in this dream went unfulfilled. It was all fulfilled in Egypt based on the Prophet's words, Egypt will be desolate and unsettled for 40 years (Yechezkel 29). The famine began during this time and lasted two years until Yaakov came to Egypt. The other 40 years referred to by Yechezkel completed the total of 42 years alluded to in the value of 3 (recountings of the dream) times 14 (number of lean cows and sheaves).
--Rabbeinu Bechaye

And they bowed to him...and he recognized them but he acted as a stranger towards them (Bereishis 42:6-7).
Normally, one who is vanquished by another feels great distress because he has lost. If the brothers had known at the moment they bowed that they were bowing to Yosef, the same Yosef whom they had made fun of when he told them that he dreamt that they were bowing to him, they would have been filled with distress and pain, like other vanquished enemies. Therefore, Yosef acted as a stranger to protect them from this pain.

The Torah voices the praise of the righteous Yosef with this incident. Another person might have rejoiced at exploiting this opportunity for revenge, to cause his enemy to really feel his downfall and loss. Yosef did the opposite. Right at the moment they bowed to him, he hid his true identity from them and acted as a stranger towards them, even though he recognized them. He did this to prevent the feeling of shame and embarrasment that the vanquished usually feel.

--Kedushas Laivi

And they ate and drank with him (Bereishis 43:34).
Rashi explains, From the time of the sale, neither they or Yosef drank wine. Why did they drink now?

Yosef drank because he was celebrating the reunion with his brothers. However, his brothers did not know it was Yosef so why did they drink?

Since Yosef suspected them of being spies, they decided that if they didn't drink, it would confirm his suspicions. Knowing that When the wine goes in, the secrets come out, not drinking would imply that they had something to hide so they drank as well.

--Kehillas Yitzchok