Gen 40-41. Joseph and Daniel, both dream interpreters, are quick to point out that it is actually God who gives them the interpretation of dreams.
--And Joseph said to them, “Do not interpretations belong to God? Please tell them to me.” (Gen 40:8; all quotes from ESV)
--And Pharaoh said to Joseph, “… I have heard it said of you that when you hear a dream you can interpret it.” Joseph answered Pharaoh, “It is not in me; God will give Pharaoh a favorable answer.” (Gen 41:15-16)
--The king said to Daniel, … “Are you able to make known to me the dream that I have seen and its interpretation?” Daniel answered the king and said, “No … but there is a God in heaven who reveals mysteries, … this mystery has been revealed to me.” (Dan 2:26-30)
Gen 37-44. Joseph’s brothers appear to undergo transformation (for the better) from the time they sell Joseph to the time they buy from him. Judah’s transformation is most explicit. In on the plan to kill his brother, Judah is the one who persuades his brothers to turn this whole scenario for profit. “What profit is it if we kill our brother and conceal his blood? Come, let us sell him to the Ishmaelites, and let not our hand be upon him, for he is our brother, our own flesh” (37:26-27).
But 14 years later, Judah pledges Benjamin’s safety to father Jacob if Jacob will just let Benjamin go with them the second time to Egypt--Benjamin must go if they are to obtain food (Gen 43:8-9).
(And remember, Benjamin is another favored brother, as Joseph was. But there is no ire in Judah now.)
And when Joseph announces his intention to incarcerate Benjamin and let the rest go free, Judah pleads with Joseph to take him instead and let Benjamin go free, not wishing to bring more sorrow to father Jacob (Gen 44:18-34).
So Judah goes from being a man who sells his favored brother into slavery, to being a man who is willing to indenture himself in order to free another favored brother. Quite a transformation!