"“We both had dreams,” they (the butler and the baker) answered, “but there is no one to interpret them.” Then Joseph said to them, “Do not interpretations belong to God? Tell me your dreams.”" (Genesis 40:8).
The interpretation of their dreams didn't come from Joseph. It was given to Joseph by God. There's an important lesson for us here. We must not claim to be wise in ourselves. We must pray that God will give to us His wisdom: "If any of you lacks wisdom, you should ask God, who gives generously to all without finding fault, and it will be given to you" (James 1:5). The wisdom comes from God. The glory goes to Him.