Deep inside the cave, Vali fought with Mayavi until he killed the asura and then fell into a deep sleep.
When Vali awoke, he made his way to the cave entrance, only to discover a huge boulder blocking his path. "Sugriva!" he shouted. "What have you done?"
Roaring with anger, Vali smashed the boulder and rushed to the palace, where he found Sugriva on the throne.
Vali tried to kill Sugriva, and Sugriva fled to the only place of safety he could think of: Matanga's ashram on Rishyamukha Hill where Vali dared not go.
Hanuman joined Sugriva in his exile.
Inspired by: Sita: An Illustrated Retelling of the Ramayana by Devdutt Pattanaik
Notes: This story is on p. 155 of the book. In Valmiki's Ramayana, this is the Kishkindha Kanda (Book 4), sarga 9.