WARNING: The following contains major spoilers for Legacies Season 3, Episode 5, "This Is What It Takes," which aired Thursday on The CW.

Last week's episode of Legacies ended with a somewhat redeemed Alyssa getting together with MG after she turned on the Necromancer and helped Josie and Lizzie trap him and Malivore in a prison world. Alyssa has a long-time crush on MG just like he has a long-time crush on Lizzie, and after Alyssa helped them, MG realized he had been treating Alyssa just like Lizzie treats him. MG decided to change that by asking Alyssa to give dating a shot. Unfortunately, Lizzie had just come to a similar conclusion about MG and was just moments too late to tell him. Instead, she walked in on him and Alyssa kissing, and had to acknowledge she missed her window. So in this week's episode, "This Is What It Takes," Lizzie is not only coping with the loss of a potential romance with MG  but the potential loss of Josie as she ponders transferring to Mystic Falls High School.

Lizzie starts her day by making breakfast for Josie, who's on her way to an orientation at Mystic Falls High. Lizzie breaks the news that their father seems to be trusting them more with magic while subtly putting down the other school, but Josie reminds Lizzie she isn't doing magic anymore and ignores her other hints. As soon as Josie leaves, MG walks in. He's taking breakfast to go because he and some of the other students have rented a place in town to get away and reset. And while MG would have invited Lizzie, Alyssa nixed the idea. Feeling guilty, MG offers to help Lizzie wash the dishes before he goes, but Lizzie decides to enlist his help in another matter.

RELATED: Hope Embraces a Dangerous Wish In Season 3, Episode 5 Clip

Lizzie has been astral projecting into the prison world to look for Landon, and she asks MG to join her on her next outing. When they get there, MG is initially freaked out by all the monsters in the place, but Lizzie reminds him that the monsters can't see or touch them so they don't have anything to worry about. Then she reveals that her reason for taking MG there isn't actually what she claimed it was. What she really wants to do is figure out a way to make Josie stay at the Salvatore School.

Lizzie confesses she's attempted to bring up her concerns to Josie but Josie hasn't picked up on any of Lizzie's hints. MG wonders why Josie is seemingly being so oblivious, which only frustrates Lizzie. But after Lizzie snaps at him, MG very politely stands up to her by pointing out that if she can figure out why Josie isn't picking up on her signals, Lizzie will probably know what to do next. After refusing to help Lizzie for perhaps the first time, MG leaves her to search the prison world for Landon on his own.

Later, Lizzie finds MG. Neither of them has located Landon, but the time has still been useful for Lizzie. She realizes even though she wants to ask Josie to stay at the Salvatore School, if Josie wants to go to Mystic Falls she shouldn't stand in the way because it would keep Josie from being happy. She also admits that the reason she asked MG to come with her to the prison world is because she regrets that Alyssa swooped in before Lizzie could stop her. Lizzie is clearly referring to her intention to declare her feelings to MG, but MG doesn't pick up on that. Instead, he thinks Lizzie is upset Alyssa destroyed the Ascendent for the prison world. Lizzie half-heartedly agrees with MG's conclusion instead of revealing what she really meant and then pulls them both out of the prison world.

RELATED: Legacies Star Teases a New Romance With an Important Character

As MG prepares to return to the rental house, Kaleb calls him. Kaleb's walking towards the house, and as he approaches, he witnesses a very naked Jed coming out the front door. A flustered Kaleb tells MG not to go there because Jed has clearly been sleeping with Alyssa. So it seems MG and Alyssa's relationship is done before it even really got started.

Later, MG and Kaleb hang out, and MG seems more amazed that he gave Alyssa a shot than heartbroken about losing her. But he also seems proud that earlier in the episode he stood up to Lizzie. This could mean that, although a new opportunity for Lizzie to suggest she and MG try dating has opened up, it's possible MG's perspective on Lizzie has changed. On the other hand, maybe if MG's not quite as wrapped around Lizzie's finger as he used to be, they'd make an even stronger couple. Still, MG has yet to have it out with Alyssa and is still oblivious to Lizzie's evolving feelings for him, so only time will tell how things will play out between MG and Alyssa, MG and Lizzie and possibly even Lizzie and Alyssa.

Legacies stars Danielle Rose Russell, Jenny Boyd, Kaylee Bryant, Quincy Fouse, Aria Shahghasemi, Peyton Alex Smith, Matt Davis, Chris Lee, Ben Levin and Leo Howard. New episodes air Thursdays at 9 p.m. ET/PT on The CW.

NEXT: Legacies: Landon & Hope Get Closer Than Ever — But It's Short-Lived