The sentence in which the underlined verb is in subjunctive mood is: if david were walking quickly, he might be on time. Option A is correct.
The subjunctive mood is used to refer to conditional or imaginary situations.
The subjunctive mood is used to explore conditions that are contrary to fact; hypotheticals, to express wishes, to express commands or demands, to express suggestions.
In this particular case, the sentence refers to a supposition or something hypothetical so it follows the main usages of subjunctive mood.