The correct option is
B Were they
NOTE: The given sentence is in the passive voice. 'Old' explains that the sentence is in simple past tense. To form a question in the simple past tense, we need 'was/were', a pronoun/noun and the verb in the past participle form.
Option A - 'Are they' can be used in the present tense and not past tense. 'They' is correct as we use 'they' as a pronoun for 'old houses'. Thus option A is incorrect.
Option C - 'Are them' can be used in the present tense and not the past tense. 'Them' is used as the object pronoun, which is used to explain about the object that has experienced the action. For example, 'We gave the apples to them', here 'them' experiences the action of receiving apples from 'we'. Here, the sentence explains 'houses' as the subject and not the object, hence we can't use them here. Thus option C is incorrect.
Option D - 'Were them' can be used in the passive voice. As the subject is plural, we can use 'were'. However, we can't use 'them' because of the above-explained reasons. Thus option D is incorrect.
Option B - 'Were they' can be used here in the passive voice. 'Were' can be used as the subject 'houses' is plural and 'they' can be used as a pronoun for the houses. Hence, option B is the correct answer.
'How old are these houses? When were they built?'