(A) had taken — The sentence expresses an unreal past condition, requiring the past perfect form "had taken" (Third Conditional: If he had taken…, he would not have been late).
The sentence uses the Third Conditional structure: If + past perfect, would + have + past participle. "Had taken" is the correct past perfect form. The other options ("have taken," "had been taking") are either wrong tense or wrong aspect for this conditional structure.