The names Amanda and Mackenzie hold special meaning to viewers of Orange Is the New Black — and season five delivered their origin story.

In a flashback scene in the sixth episode of the prison dramedy's new season (now streaming on Netflix), Taystee (Danielle Brooks), wearing fresh Litchfield scrubs, walked into the library where she first met Poussey (Samira Wiley). Wide-eyed and assessing her new home, Taystee sat alone, overhearing two white inmates comparing their prison diets to Weight Watchers.

"Amanda, I will not stop until my ass is so small it disappears entirely," said a voice from beyond the grave, this time, from behind the bookshelf. "You heard about this new diet where you eat cookies and ice cream and you still lose weight? It's called bulimia! I love it so much, it's a miracle!"

Taystee replied, "Oh, Mackenzie. I've always been jealous of your willpower. I'm like a house ever since Mark invested in that new American bistro up the street. You would die for their artisanal sodas. Peach lavender rose petal, yes please!"

The scene, which capped off an episode that delicately danced between Taystee's past and present life, came as a gift to viewers who have been grieving along with Taystee mourning Poussey Washington, who was killed off the series at the end of last season.

"It wasn’t until we came into the writers room for season five that we knew we were going to bring her back," Lauren Morelli, a veteran writer and producer on the series tells The Hollywood Reporter. "That’s really the brilliance of the flashback structure. It’s this endless gift that keeps on giving — it gives you so many paths to go down and just opens up the whole world. As we started talking about season five and all this being in reaction to Poussey's death, we felt that while we were honoring her death and having these women fight for what they believe in, it would be really, hopefully, impactful to get to see her face again."

Morelli, who wrote the flashback episode as well as the episode of Poussey's death, is also married to the actress who plays Poussey. But Wiley wasn't clued in on the cameo until Morelli sat down to write the actual episode.

"We live in a house where I cannot talk about work!" says Morelli, explaining that ideas on the show can change last minute. "I was trying to keep it quiet because we were talking about it in the room but nothing was really sure. When I got assigned and actually sat down writing, that’s when I told her."

Wiley was already off shooting Hulu's Handmaid's Tale, but luckily the schedules aligned. "There were so many unknowns and she was, of course, really thrilled when I told her about it."

The day of shooting was Wiley's only day returning to the set of Litchfield prison, as the actress said she tried to join the real general population and avoid spoilers. She received several FaceTime calls from her pals still on the set and she tried her best to keep a work-life balance with Morelli at home, asking how her day was but not requiring too many details.

But mainly, saying goodbye was hard.

"They’re my sisters, really," Wiley tells THR of leaving both Poussey and her castmates behind."It’s hard to see someone that you brought to life for the past four years, who you feel like is a real person to you. I miss Poussey. The whole thing of it, it’s really a momentous occasion. When you film it, it's this abstract idea that someone is gone. To actually watch her die was hard."

In addition to the moment serving as one more moment with Poussey, the scene serves as a reminder as to how far the series has come.

"It was a reminder of what a journey the show has been and how far ahead we are now in the narrative and how far away that flashback felt. How young and what a different time it was then," says Morelli of the episode, which was directed by Andrew McCarthy. For Wiley, "It felt like someone who graduated from high school who then came back to visit. It was such a homecoming for her and everyone was so happy to see her, including the crew. For me, it was really great to have her there and so nice to have her on set."

The day of filming brought a welcome reunion for Brooks, whose history with Wiley dates all the way back to their time at Julliard. But going all the way back to the beginning when so much has transpired was no easy feat.

"It was actually really challenging because you have to now go back to a different mindset of your character," Brooks tells THR. "Taystee was so youthful and, as we saw, just going through this stuff with her mom, but she’s been in the system. So she’s now like, 'Ok, I have to make a friend.' To go back to that mindset when in current time, she’s now started a riot was kind of tricky. I remember it actually being a little hard to remember my lines that day — I think because I was so excited about working with Samira again that I couldn’t stay focused."

Indeed, Wiley was there on set for the other scenes that were filmed that day, which included Taystee's powerful burning of the Cheetos and Takis bribe — a turning point in her fight for justice for Poussey through prison reform negotiations, power shifts and taking the guards hostage.

"She has nothing to lose," Brooks says of Taystee, who also lost her mother-figure Vee (Yvonne Parker) in the second season. "As she stated in those episodes: this is her home. This is her family. She’s going to fight. It’s the natural-born leader in her that wasn’t taught, because obviously as we see in her flashbacks and what we know from the other seasons is that she’s never had anyone to guide her through this journey and everything that she’s learning is in the system."

Tell THR how you reacted to the surprise reunion in the comments below and keep up with Live Feed for cast interviews and full Orange Is the New Black coverage all week.