It works like this:
Kaidou showed interest in having a Devil Fruit after Whitebeard’s demonstration.
A bit later, Big Mom discovers that God Valley has Devil Fruits, and Kaidou asks to find out what their powers are.
During that time, it becomes clear that after learning about the Devil Fruits that would be in God Valley, Big Mom promised something to Kaidou. Everything indicates that if she found the Azure Dragon, she would give it to him. This explains why Kaidou, not fully trusting her promise, asks her again when they arrive at God Valley:
“ARE YOU REALLY GONNA GIVE ME A DEVIL FRUIT, LINLIN?”
With Kaidou unsure whether he should trust her or not, Big Mom goes ahead and lies to him in the meantime, breaking the trust he had in her.
So, the sequence of events that led to the final page was as follows:
Kaidou wanted a Devil Fruit → Big Mom discovered there would be Devil Fruits in God Valley → She asked to learn about their powers → They made a deal that Big Mom would give a Devil Fruit to Kaidou → Kaidou asked her if she was really going to give him one upon arriving at God Valley → Big Mom lied to him in the meantime → Kaidou lost trust in her → Big Mom found the Devil Fruit → Kaidou took it from her.
Kaidou was actually very clever — the real rat in the story isn’t him, it’s Big Mom.