“For he had interpreted well” — from where did he know? R’ Elazar said: this teaches that each one was shown his own dream and the interpretation of his fellow’s dream.
On the daf / in context: The baker knows Yosef interpreted well because he had already seen the butler’s outcome in his own vision.
Type of Learning
Derash on the verse (Bavli sugya) — not a formal named middah of the 13. Knowledge of a good interpretation is explained by shared dream-revelation.
What Is Learned
Each prisoner was shown both dreams; that is how the baker could judge that Yosef had interpreted well.