Correct option is D
The correct substitution of the highlighted words is (d) had we boarded.
The original sentence is intended to be in the structure of an inversion that is common with the adverb "hardly," which triggers the inversion of the subject and auxiliary verb in formal English.
Therefore, "Had we boarded" correctly follows the rule for inverted conditional sentences.
Grammatical rule used: When using "hardly" at the beginning of a sentence to describe an event that occurred immediately after another, the subject and auxiliary are inverted.
Example: Hardly had I arrived when the meeting started.