In the Thanksgiving episode of This Is Us, Randall was devastated by family secrets finally getting brought to light. After a lifetime of longing for a connection to his birth family, Randall finally found his biological father, William, only to discover their their time together was increasingly limited due to William's terminal cancer. When Randall discovered that Rebecca knew about William from the start and kept it a secret, he began to spiral. It wasn't until accidentally ingesting some hallucinatory mushrooms that Randal began to understand where his mother was coming from. Randall's visions of Jack on This Is Us helped him come to terms with Rebecca's betrayal, though he hasn't forgiven her yet.
Before the mushrooms came into play, Randall was so wrapped up in his anger that he didn't know what to do. To him, it felt like his entire life was a lie, with every good memory colored by his mother's deception, and all he wanted was for her to hurt as badly as he did. The mushrooms — which were in a smoothie that Olivia's hipster ex-boyfriend brought to the Pearson family cabin, of course — allowed Randall to dig deeper into his psyche and understand not only his own fears, but Rebecca's as well.
Jack proved to be an ideal guide for Randall, as perfect in Randall's visions as he is in every flashback. Acting as a Ghost of Thanksgiving Present, he took Randall through memories and visions while also allaying his deepest insecurities. Randall was able to share his darkest doubts with his father, like the sneaking suspicion he'd always had that he was unwanted by everyone: that his birth family abandoned him because they didn't want him and his adoptive parents only took him in to replace the son they'd lost.
Ghost Jack assured him this wasn't the case and that Randall wasn't a replacement; he was simply their son, something Jack knew from the moment he saw Randall. It became clear that Rebecca's lies were the result of her own fear that Randall could be taken from them because of the circumstances of his adoption. When Jack showed Randall a vision that represented Rebecca's pain — it showed her frantically locking doors and windows inside the cabin, trapped by the secret she was keeping while still trying to protect her family — he was finally able to find sympathy for his mother despite how badly she hurt him.
The episode ended with Randall expressing that understanding to Rebecca, but he is still far from forgiving her. That's something that will take time, but the strong foundation of the Pearson family indicates that this is one earth-shattering revelation that they will hopefully be able to survive. Jack just needed to remind Randall of that and to help put himself in his mother's shoes.