On Teen Wolf Season 6 Episode 9, Noah and Liam head to the Sheriff's station to go free Theo. After making him say something he remembers about Stiles, Noah lets Theo out of the cell. Then, the Ghost Riders show up and take Noah.
It's all up to Liam and Theo now. They have to keep the Ghost Riders occupied while Scott, Malia, and Lydia try to remember Stiles. The plan is to lower Scott's body temperature low enough that he gets put into almost like a hypnotic state.
At first, the plan doesn't work. Scott is overwhelmed by memories. After Lydia starts talking him through it like he is being hypnotized, the plan starts to work. Scott connects to a powerful memory where Stiles calls him his brother.
Liam and Theo lure the Ghost Riders to a hospital, and despite Theo's protests, he stays and helps Liam hold off the Ghost Riders as long as they can. Liam knows that they will both be taken, but he stays and fights to give Scott time.
In the end, Theo ends up sacrificing himself to protect Liam.
It's still not enough. Scott's body temperature gets too low, and he gets pulled out. Malia goes in next, and it looks like it is finally starting to work, but once again, her body temperature drops too low. Malia connects to a memory where Stiles promised that he would never leave her.
Now, it's up to Lydia. Scott and Malia hypnotize her, and it works. Lydia's most powerful memory with Stiles is her last one, and the heartbreaking realization that she never told Stiles that she loved him.
A rift opens, and the three of them see a figure in a tunnel of light. Stiles?