God is providentially using Joseph’s participation in these two officers’ dreams (while in prison) to prepare him for what He intends to do in relation to Pharaoh (and beyond), while simultaneously reminding Joseph that He hasn’t forgotten him (even though he’s in prison and it’s been some time) nor His word to him.
There’s no place, no time, no action, and no person that can keep God from providentially working to accomplish His word.
Will we demonstrate confidence in Him by waiting on Him, caring for others, asserting His sovereignty, and appealing for justice?
God providentially works in and through the unjust treatment of His people, in order to accomplish His word and purpose (all without minimizing the culpability of those guilty of sin and the responsibility of His people to do what is right, and all without attributing to Him any wrongdoing whatsoever).