Complex sentence: Rapunzel starts to reveal that her hair glows when she sings--but then realizes that this is their key to escape, as her hair provides enough light to find a way out of the cave.
Split into simpler sentences: Rapunzel starts to reveal that her hair glows when she sings, but then realizes that this is their key to escape. Her hair provides enough light to find a way out of the cave.