Complex sentence: It was written by Mindy Kaling, who portrays Kelly Kapoor on the series; and directed by Steve Carell, who portrays Michael Scott, it's also the second episode he has directed for the series.
Split into simpler sentences: It was written by Mindy Kaling, who portrays Kelly Kapoor on the series, and directed by Steve Carell, who portrays Michael Scott. It is also the second episode he has directed for the series.