 " Dream Team " was written by B. J. Novak and directed by Paul Feig . It originally aired on April 9 , 2009 , the same day as the episode " Michael Scott Paper Company " ; the debut episode of the new NBC show Parks and Recreation was shown between the two episodes . It marks the first appearance of Novak as Ryan since " Frame Toby " in November 2008 , when Novak briefly left the show to film his role in Quentin Tarantino 's Inglourious Basterds . Mindy Kaling , an Office writer who also stars as Kelly Kapoor , thought of the idea of Ryan dying his hair blond . Novak wore a baseball cap in public between the times his hair was dyed and when the episode aired , in order to make the reveal a surprise , and even kept the cap on when he and the rest of the cast and crew did a public forum and Q & A session . " Dream Team " was the third of six episodes guest starring Idris Elba , best known as Stringer Bell from the television series The Wire . Elba said he did not watch the episode when it aired because " I 'm hypercritical about my work , so I try not to torture myself . " 
