וַיְהִ֕י מִקֵּ֖ץ שְׁנָתַ֣יִם יָמִ֑ים וּפַרְעֹ֣ה חֹלֵ֔ם וְהִנֵּ֖ה עֹמֵ֥ד עַל־הַיְאֹֽר׃
E aconteceu ao fim de dois anos, e Par'oh sonhou, e eis que estava em pé junto ao rio.
Or HaChaim
מן היאור עולות, from the river there were rising, etc. The Torah should have written: עולות שבע פרות מן היאור, "seven cows were rising from the river." Why was the river mentioned first? Perhaps the Torah wanted us to appreciate that the existence of those cows was entirely due to the river, as if the river itself had produced them. To this end the Torah first had to mention who it was that created these cows. What the river produced became of secondary importance. Had the Torah employed the normal syntax we would have thought that the cows crossed the river and rose on the far bank but not that they were a product of the river itself. This very fact also made Pharaoh aware that it could only be a dream. In real life rivers do not produce cows. The reason he was given such a vision was to alert Joseph to the fact that two separate products emanated from the river, i.e. the years of plenty and the years of famine. The river was the key to the ability of the cows to rise or not to rise.
Tze'enah Ure'enah
After twelve years Pharaoh had a dream where he was standing by the water, and after two years Pharaoh had a dream. Bahya and Toldot Yizhak ask, why did the verse not say, and Pharaoh, king of Egypt? The explanation is because his downfall first came with the ten plagues, through the hand of Moses, who punished the river that it became all blood. Here, the dream was by the water, and that is why the verse does not want to call him king. That is to say, his kingship had become ordinary near the water. Therefore in the whole portion it is just written Pharaoh and not king. As soon as he starts to think that Joseph should become a king, He remembered Pharaoh, “when he stood before Pharaoh, king of Egypt” [41:46]. That is to say, for the sake of Joseph’s honor it says that Pharaoh was a king, and he made Joseph a king. The verse shows us that the kingdom of Pharaoh remained standing because Joseph had given him the advice that he should gather grain for the famine. Therefore, it also says, “by the river” [41:1]. This means, he dreamed that he was standing over the water. It should have correctly said, by the bank of the river. This would have meant, by the shore of the water. This shows us that Pharaoh made himself to be a false god. He was a lord and said that he created the water, and what the evildoer intended came to him in a dream. The Holy One wanted to drown Pharaoh with dreams and to make his wise men fools, that they should not know what the dream meant, in the expectation that Joseph would come and explain the dream and would become a king.3Bahya, Genesis, 41:1; Toldot Yizhak, Genesis, 41:1.
Rashi
Days and four months. The minimum [number] of days is two. It is impossible to explain this word, 'יָמִים' as a year3As we find יָמִים to mean ‘year’ in Bereishis 41:1. because Dovid did not go to Achish until Shmuel had died, and Shaul only reigned after Shmuel's death4Therefore יָמִים is to be taken literally, i.e., days. four months, as we learned in Seder Olam. Also [this can be deduced from the following:] the number of Eili's years [forty years which he judged Yisroel],5Above 4:18. and the twenty years that the Ark was in Kiryas Ye'arim6Above 7:2. total sixty years. Subtract from that Shmuel's fifty-two years, plus one year from his conception, with these four months, plus the seven years which Dovid reigned in Chevron7II Shmuel 2:5. before he brought the Ark from Kiryas Ye'arim. This [calculation] discloses that Shaul reigned after Shmuel's death but four months.
Rashi
neither shall it be inhabited for forty years Forty-two years of famine were decreed in Pharaoh’s dream, corresponding to the three times the dream is written. He saw seven bad cows and seven bad ears of grain (Gen. 41) and he told it to Joseph; hence we have [it mentioned] twice, and Joseph said to him, “The seven thin and bad cows and the seven empty ears,” totaling forty-two for the famine. But they had only two, as it is stated (ibid. 45:6): “For it is two years now that the famine has been on earth,” and when Jacob came down to Egypt, the famine ceased, for behold in the third year they sowed, as it is stated (ibid. 47:19): “and then you give us seed that we may live etc.,” and the forty years were paid to them now: “neither shall it be inhabited for forty years.”