B fits the best in that sentence :)
B because he knows he can see something when he is almost home
The best word to complete the sentence is B. when, as it perfectly indicates the moment Paul realizes he is almost home. The other options do not fit the context of the sentence. Thus, the final sentence reads: "Paul knew he was almost home when he saw the lights of his farmhouse ahead."
;