Complex sentence: Cavanagh first guest starred on the sitcom "Scrubs" in 2002 ("My Big Brother") where he was cast as Dan Dorian, the brother of lead character J.D. (Zach Braff), because of his resemblance to Braff.
Split into simpler sentences: Cavanagh first guest starred on the sitcom "Scrubs" in 2002 ("My Big Brother"). He was hired to play Dan Dorian, the brother of lead character J.D. (Zach Braff), because of his resemblance to Braff.