Who lives in the house next door?

Literal

Next [of-の] house [in-には] who [subject-が] lives-ている [question-のか].

の at the end is the casual explanatory nominalizer — equivalent in function to ~んです / ~のです. 誰が住んでいる... ですか asks 'who is it that lives there.' The には composite marks 'in the next door house' as topic + location.