When Rainbow Dash crashes into the library one too many times, Twilight ends up becoming her coach for the upcoming Best Young Flier Competition. As they train together, Rainbow Dash's thoughts begin to drift to the librarian, and her feelings towards her change. After coming to terms with these feelings, she decides to tell Twilight, and plans a special night of stargazing for the occasion.
But when she comes out and haphazardly kisses Twilight on the lips, Twilight shoves her away, yells at Dash for stealing her first kiss, and storms back to the library. Rainbow follows her back to the library outside the front door, and tells Twilight she's not leaving until she lets her properly apologize to her. Twilight tells her to go home, and leaves the door closed.
The next morning, Twilight gets up and finds Rainbow Dash still outside the library door, a shivering mess from staying out in the cold. Despite still being mad at her for the out-of-the-blue kiss the night before, she takes her inside. The first thing Dash does when she brings her inside is apologize to her.
After a few days spent nursing Rainbow Dash back to health at her bedside, Twilight begins to think about what her friend means to her, and what the kiss meant. Although she hadn't ever really thought about being in a relationship, Dash was her friend, and it couldn't hurt to see how things went after a date or two.
A few nights later after Dash recovers, the two go on a date, and it goes wonderfully.
But the Best Young Flier Competition still lies on the horizon. Dash continues training in the days leading up to it, but after still failing in practice to do a sonic rainboom, her confidence falters, and she asks if Twilight could come to cheer her on.
The two of them go up to Cloudsdale, where Twilight quickly begins to panic about them being seen in public together. Her paranoia about what other ponies think, and the chances of running into somepony they know, cause her to distance herself from Dash, causing a rift in their relationship. After seeing Twilight act like this all day, Dash lets it out at her, to which Twilight admits she's still uncertain about their relationship.
Dash tells Twilight that she has to make a firm decision, just before leaving for the competition.
Twilight lies down and thinks about it in their hotel room, playing over the events of the past couple weeks in her head. Eventually, she realizes that this is what she wants, and chases down Dash to the coliseum, kissing her in front of everypony. Dash goes on to perform a sonic rainboom and win the contest, scoring a day with the Wonderbolts.
When Celestia presents Rainbow Dash with her award, she asks the pegasus if she'll tell her student to send her a letter about what she's learned from their relationship so far.
On the night spent with the Wonderbolts, Dash gets to meet the whole team, along with Spitfire, whom she met already at the marketplace before the competition. The night goes well, and they all have a great time, but eventually the restaurant closes and they have to call it a night.
However, after all the other Wonderbolts leave, Spitfire takes Dash out to the restaurant's balcony: settled high in the clouds of Cloudsdale. The two of them go flying, where Rainbow Dash makes a lasting impression on Spitfire with her skill and ease in the air.
Late that night, the two of them fly back down to Ponyville and fall asleep together at the library. The next morning Dash confronts Twilight about telling their friends, and gathers their friends later that evening to give them the news that they're a couple now. When Dash is about to tell them, though, Twilight runs away, disappearing somewhere in Ponyville. Rainbow Dash, Pinkie Pie, Rarity, Applejack, and Fluttershy search until dark, looking for her. They're about to call it a night, when Dash figures out where Twilight is, and finds her lying on the field where they first kissed, soul searching.
During the time that she ran away, Twilight's resolve solidified, and she herself breaks the news to their friends by telling them about her and Dash's first kiss.
The news is taken well by Pinkie Pie and Rarity, but Fluttershy and Applejack are hesitant, having grown up with certain values. They wish well for their friends, but admit that seeing two mares that they know together is strange.
Rainbow Dash can't believe that her two oldest friends in Ponyville would feel that way, and gets upset with them. She winds up storming off, leaving Twilight to comfort her. She doesn't speak to Fluttershy or Applejack for some time afterwards.
Twilight spends the time while Rainbow Dash is working on researching a spell she almost forgotten about: a spell to create a permanent pair of pegasus wings.
Meanwhile, Spitfire begins to develop a crush on Rainbow Dash, which distracts her to the point of being unable to stay focused in practice. In order to solve it, she takes her vacation time and goes to Ponyville, seeking to resolve the problem in some way or another. After a few days in the new town, she manages to meet up with Rainbow Dash after work, and the two go for another evening flight, which ends with Spitfire offering for Dash to join the Wonderbolts.
Despite it being her dream, Dash turns it down. She explains that she isn't quite ready to leave Ponyville yet, but is grateful for the offer. Spitfire lets her know that she can always contact her if she changes her mind.
Ever since they came back from Cloudsdale, Rainbow Dash has felt a little smothered by Twilight's affections, used to being on her own for so long. When the two of them go to spend the night at Rainbow Dash's place for a change, Dash stumbles over her words, making Twilight think she was breaking up with her.
"I was thinking we should maybe... see less of each other."
In tears, Twilight wants to leave, and Dash, feeling guilty, takes her down from her cloud home up in the sky. Twilight just asks to be set down right on the ground below, and once there, kicks off of Dash's back and runs away into the dark and stormy night.
After having a moment to collect her thoughts, Dash goes after her, determined to make things right.
Twilight stumbles through the dark, lost, eventually stumbling across the home Spitfire's staying at. The Wonderbolt takes her in and offers her a shower and a bed to sleep in as Twilight tells her what happened. But less than an hour later, while Twilight is in the shower, Spitfire spots a silhouette out in the storm that she figures has to be Dash, looking for Twilight. She grabs a lantern and brings Rainbow Dash out of the storm, not telling her that Twilight was also there.
As they talk, it slips out that she has a crush on Dash. Rainbow doesn't believe her, so, thinking that Dash and Twilight had broken up, Spitfire lies on the couch on top of Rainbow Dash, and leans down to kiss her.
But before she can, they hear the door open then slam shut.
The gears in Dash's head turn, and she sits Spitfire back up and asks her in a dark tone,
"Who was that, Spitfire?"
Finding out that it was Twilight, Dash gets up and yells at Spitfire, where she finds out how she had accidentally broken up with Twilight. she chases Twilight down to the library, where Twilight has the door locked shut. Eventually, not wanting Dash to stay outside her door in the storm all night, she lets her in. The two of them talk very little, neither quite knowing what to say about what happened.
The next morning Dash leaves to ask for advice on what to do, while both of them are left wondering what the state of their relationship is.
Spitfire also goes out to seek advice, on how she can regain Dash's trust. She eventually finds Twilight at the Carousel Boutique, being comforted by Rarity. Peeping in through a window, she sees Twilight with her head buried in her hooves, crying, and decides that first she needs to apologize to her.
She goes inside and explains the events of the night to her. How she'd been the one to put Dash in that position, what Dash had really meant, and how broken up Dash had been over Twilight running away. Then, she tells Twilight that she's leaving Ponyville and going back to Canterlot, having done enough damage here.
Twilight goes to Dash's home and waits for her to come back from work. She tackles Dash in a hug and pours her heart out, telling Dash how she felt that she had screwed up their relationship, and how she thought Dash was ending it because of that.
The two of them reconcile over past misunderstandings, and make up.
Dash asks where Spitfire is, and finds out from Twilight that she's catching a train that night back to Canterlot.
The two of them rush to the train station, seeing if they can catch her in time and thank her for bringing them back together, but they arrive right as the train's leaving, and having been up for almost 48 hours, neither was in any shape to catch up to it as it pulled away from the station.
They buy tickets and catch the next train to Canterlot.
Once they finally catch up to Spitfire, though, they find her broken down in her apartment, crying. Dash asks for Twilight to stand outside while she talks to her. Dash tries apologizing and explaining herself, but all Spitfire can do is yell at her for following her.
Dash interrupts her with an impulse driven kiss to her lips.
Both of them are shocked at her doing such a thing, and Spitfire asks why she did it.
“I... I’m not sure. It just... happened.”
Spitfire tells Rainbow Dash to get out of her apartment.
Dash walks outside to find Twilight, sitting by the door. She heard everything.
They talk things over.
“I heard everything you two said. It makes me happy to know you still have feelings for me. I just don’t understand why that isn’t enough, why you have feelings for Spitfire, too.”
Twilight tells her that she needs some time to think. As she leaves, Dash desperately catches up to her and kisses her, trying to elicit some emotion from her, but Twilight isn't receptive to it. After the kiss ends, Twilight rests her hoof on Dash's cheek.
“We’ll talk at the palace. But right now I want time alone to think. Please give me that.”
Twilight goes to leave again, and this time Dash doesn't stop her.
Instead, she flies to Canterlot Palace to seek help from Princess Celestia: the only pony she can think of to go to help for. The Princess gives her some advice, and asks that whatever Dash decides to do, that she keeps her student's feelings in mind. She writes a letter for Twilight and tells Dash to give it to her, and that it would mean more coming from her.
Twilight goes to visit Spike, and talk to her old professor that he's staying with, seeking permission to access the restricted section of the Magic University's library. She tells him about her research into her spell, but he tells her that he can't condone research on such a taboo spell.
Meanwhile, Spitfire winds up finding Rainbow Dash atop a roof, watching the sunset. She apologizes for the way she acted back at the apartment, and they talk on a rooftop for a while about what happened, and then Spitfire asks what Dash feels for her. Dash can't answer. Spitfire kisses her, one last time, and then flies away.
Twilight's forced to sneak into the restricted section. Defensive magic countermeasures don't stand up to a student of the Princess, and she discovers some of Star Swirl the Bearded's early research that is closely linked to the spell she's working on now. Stealing it from the library, she disappears before she's discovered and makes it away in time to meet up with Dash.
When the two of them talk, they both admit how much of a disaster their relationship has been. Despite it though, Dash says she wouldn't give it up for anything in the world, and that she still wants to be together. Twilight is hesitant, but eventually Rainbow Dash manages to convince her that: although it will be hard, they can mend their broken relationship.
They kiss, and the kiss reminds Twilight of everything she feels when she's around Dash. The two of them leave, and catch a train back to Ponyville that very same night.
Now Dash still holds the Princess' letter, and is trying to regain Twilight's trust as Twilight heads home with a bounty of new research material for her spell.