The correct option is
A would have
A sentence is in the type 3 conditional refers to an unreal past condition (if-clause) and its probable result (main clause).
The
given sentence shows a type 3 conditional, as the if-clause tells an
unreal past action and the would-clause tells its probable result.
In such a sentence, the tenses are:
if clause - if + past perfect
and
main clause - perfect conditional/perfect continuous conditional
The
if-clause "if she had forgotten her keys" is in the past perfect tense,
hence the main clause is a present/perfect conditional.
Option D: 'Would have' is A present conditional, hence it's the most
suitable option for the given sentence, and option D is correct.
Options A: 'Had' is a simple past tense verb and expresses a real action that happened. It doesn't state a conditional.
Option
B: 'Was' is a past tense verb (in the passive voice) and expresses an action that occurred towards the subject (the subject received the action). Also, it explains an action that has actually happened, whereas the sentence states a hypothetical event.
Option C: 'Would' is missing an auxiliary verb 'have', without which the tense cannot be explained.
Hence options A, B and C are incorrect.