Which statement is an example of a compound sentence

Answer: D. Paolo missed his girlfriend, but he knew she'd be back soon.
Explanation: a compound sentence is formed when two or more independent clauses (a sentence that has a subject, a verb, and it has meaning on its own) joined by a conjunction (but, so for, by, etc), or a comma. In the given sentences, the example of a compound sentence is the last one, because it has two independent clauses "Paolo missed his girlfriend" and "he knew she'd be back soon", both clauses have meaning on their own, and they are joined by the conjunction "but".