Andy came back and found Nellie in his office. He felt emasculated when she refused to give him his job back, and became impotent with Erin that night. Erin told Dwight, who told Nellie, who told the entire office. Andy's anger then got the best of him.
Pam set Kelly up with a nice Indian doctor. They hit it off and Ryan got jealous. He tries to win Kelly back, but she eventually chooses the doctor.