A pilot and his passenger were killed when the small plane they were flying in got distracted while taking a selfie before taking his final exam and after having twin babies.
A pilot and his passenger were killed when the small plane (that) they were flying in got distracted while they were taking a selfie.
主要子句:A pilot and his passenger were killed.
副詞子句:when the small plane got distracted 修飾主句的述部,提供其時間點
形容詞子句:(that) they were flying修飾前面的名詞plane,連接詞that因是子句裡的受詞,所以可省略
副詞子句:while they were taking a selfie修飾副詞子句的述部,是供其時間點。they were必須標示出來,否則成了taking a selfie的是the small plane:小飛機在玩自拍?因為分詞構句邏輯上的主詞,是其修飾的句子的主詞時,才可省略,但本句不是)