Pam Beesly and Karen Filippelli have a tense relationship when Karen accompanies Jim when they join the Scranton branch from Stamford. Pam harbors feelings for Jim but cannot act on them because Jim is dating Karen.
Pam initially suspects something between Karen and Jim Halpert when Karen gives him a stick of gum during their first conference room meeting. She is even more concerned when she sees Karen pat his back as they return from Michael's failed team-building exercise. Her suspicions are confirmed when Jim tells her later that day that "I've sort of started seeing someone."
Pam realizes that she is being cold to Karen and takes steps to be friendly towards her. The two found the Committee to Plan Parties and organize a far more successful Christmas party than the one organized by the Party Planning Committee. ("A Benihana Christmas")
Pam convinces Jim to allow Karen to move to a rental home two blocks from Jim's place. She is devastated that her efforts to support her friend Jim serve to drive him into Karen's arms. ("Back From Vacation")
After Karen learns that Jim once had a "thing" for Pam ("Traveling Salesmen"), she becomes more suspicious of Pam and her motives. After observing Jim and Pam pranking Andy to the breaking point, she asks Jim directly whether he still has feelings for Pam. Jim admits, "Yes." ("The Return")
The tension between Karen and Pam over Jim escalates. Karen begins hugging Jim more openly in front of Pam. ("Ben Franklin")
During Pam's visit to the Utica branch, she meets Karen, who is now married and expecting her first child. The two are happy for each other, and Pam is relieved that there are no hard feelings between them, and later she tells Michael that she is glad that she got closure with Karen. ("Lecture Circuit Part 1")