Earth was no more. Humans had long since civilized many other planets, though one of these planets no longer bore trees, and humans no longer ate food, there was still one organic thing living there purely on accident. Her name was Rainbow Dash.
When Twilight eventually wakes up, she isn't in her library. She isn't even in Ponyville. With a more minor case of amnesia and lots of questions, it becomes more and more clear, that Twilight isn't sane anymore.
Trxie is just a young filly, ecstatic and happy to be performing on the road. Though she will have to learn that the world is a dark and unforgiving place.