The Backstreet Boys were much more popular than N-Sync since they were not very good overall.

Who is "they" in this prior sentence?
N-Sync
Gary envied Bill because he was poor.

Who is "he" in this prior sentence?
Gary
Johnson wanted to make friendship with David, because he is well connected.

Who is "he" in this prior sentence?
David