<P> At the wedding, Kelly Kapoor (Mindy Kaling) arrives with her husband Ravi (Sendhil Ramamurthy), where Ryan Howard (B.J. Novak) surprises them with a baby, his son Drake, that he had with a former girlfriend who then abandoned them both . Jim tells Dwight that under Schrute tradition, he is not allowed to be best man as he is younger than him . Jim surprises him with the arrival of Michael Scott (Steve Carell). The wedding proceeds in Schrute tradition with Michael as Dwight's new best man . At the reception, Michael shows Pam pictures of his kids with Holly Flax, and Pam notes that he is paying for two phones just to hold all the images . Ryan deliberately gives Drake an allergic reaction so that Ravi, a pediatrician, can attend and Ryan can steal Kelly away . Kevin tells Ravi that Ryan wanted him to keep Drake so that Ryan can have Kelly and the two can start a new life together . Ravi then gives Kevin the baby to give to Child Services before leaving, but Nellie, who has still been wanting a child, takes Drake instead . </P> <P> When Jim and Pam briefly return home, Jim is surprised to find Carol Stills (Nancy Carell) showing their house to another couple . Pam comes clean and admits she has been showing the house for two months . She wants to repay Jim for all his romantic gestures and says she wants him to go to Athleap in Austin, at which point the couple seeing the house make an offer . Jim and Pam go to an after party at the warehouse where they inform an elated Darryl of their plans, with Jim being able to rejoin the company with no change . Pam unveils a new painted mural featuring the history of their branch . A final picture is taken with the employees and the camera crew before the employees go back up to the office for a final toast . Jim and Pam tell Dwight they are quitting, but Dwight fires them instead so he can give them hefty severance packages, as a last gesture of friendship . The employees are surprised to find Creed, who has been living in Ryan's old closet since faking his death, in the office . Creed sings a song on the guitar for the office before being arrested . The employees give one last round of interviews before leaving, with Pam taking her watercolor of the office building that Michael bought from her in the third - season episode "Business School". </P> <P> "Finale" was written by series developer and showrunner Greg Daniels, making it his second writing credit for the year, after the season debut "New Guys", and his 12th writing credit overall . The episode was directed by Ken Kwapis . Kwapis had originally directed the series' pilot episode . Daniels joked that Kwapis was "the country vet who birthed this puppy" and had come "back to put it down". His last directorial credit for the series, prior to "Finale", however, was the fifth season episode "Company Picnic". The initial idea for the finale was thought of by Daniels during production of the third season, described as "a reunion show", in the fashion of the post-competition cast rehashes familiar from reality shows like Survivor ". Daniels, at one point, approached Jeff Probst, the host of Survivor, to appear in the finale as a moderator for the fictional reunion, although he declined . The initial table read for the episode took place on March 4, 2013 . Filming commenced on March 6 . According to Jenna Fischer, the episode took nine days to film, with the cast devoting 12 hours a day to the episode . The finale was described as "ambitious", featuring multiple location shoots, including one in an AT&T Office Building, which stood in for the Scranton Cultural Center . Filming for the episode and series as a whole came to an end on March 16, 2013 . Wilson later tweeted a picture of the empty set after all filming had been finished . </P> <P> Originally, the episode was supposed to be the 23rd and 24th episodes of the season, which would have meant that the series aired exactly 200 episodes . However, the series' penultimate episode was elongated into 2 separate episodes, resulting in "Finale" being the 24th and 25th episodes of the season . This meant that the last part of "Finale" is the series' 201st episode . Once filming finished Daniels, in an interview with TVLine, expressed his hope to expand the episode, stating, "I was very excited with the footage we got...It's very big . I'm going to beg NBC to super-size it or extend it ." Daniels later commented that when the editors cut together the first act, it was 23 minutes long; this is much longer than a normal first act for an hour long episode of television . In response, OfficeTally--the largest fan site for the series--started an online petition to supersize the finale, similar to the petition to expand the second - season finale, "Casino Night". By May 2, the petition had received over 20,000 signatures . On May 7, it was announced that NBC had extended the episode by 15 minutes, meaning that the episode would air in a 75 - minute time slot . The episode is approximately 52 minutes in length . </P>

Where was the last episode of the office filmed
find me the text answering this question