- Sam got to the station just in time to catch the train to the airport. If he had missed his train, he would have missed his flight.
What you have there is right.
SHORT ANSWER: You are talking about a past time situation, and it is one that you know did not occur (modal remoteness), and so, your version with "If he had missed his train . . ." is the one that you want. It uses a past-perfect construction: the past-tense "had" could be used for past time meaning and the perfect construction for the modal remoteness meaning. If you used a version that only used the simple past-tense (instead of the past-perfect construction), then it would be an open conditional, which you don't want.
You don't want to change the last sentence--the one with the conditional--to use the simple past-tense (instead of the past-perfect construction--which is also known as preterite perfect). For if you did, then that version would be an open conditional construction, which is not what you want here. Here is the open conditional for that past time situation(s):
- If Sam missed his train, he will have missed his flight. -- [open conditional]
That is an open conditional, which means that the speaker doesn't know anything that could affect the possibility of that past time situation(s) of occurring: that is, the speaker doesn't know if Sam had missed his train or not, nor does the speaker have an opinion on that possibility. In other words, the possibility is open.
But that is not the situation in your context. The speaker knows that Sam did not miss his train--the speaker knows that Sam had actually caught it. So there is counter-factuality or modal remoteness involved. To show this modal remoteness, the speaker sticks in another past-tense (a secondary past-tense, i.e. the perfect construction) into the "If P" part (protasis), which creates a preterite-perfect, and then for the second part (apodosis), changes "will" to the past-tense "would". Thus, creates a corresponding remote conditional construction:
- If Sam had missed his train, he would have missed his flight. -- [remote conditional]
And so, for the "If P" part (protasis): the preterite "had" is used to put the situation into the past time sphere, and the perfect construction ("had/has missed") is used to insert the modality (modal remoteness). And for the "then Q" part (apodosis): there's also two past-tenses--the preterite "would" and the perfect "have missed"--and one is used to put the Q's situation into the past time sphere and the other one is used for modal remoteness.
NOTE: Today's standard English has two past tenses. There is a primary past-tense called the preterite, which is marked inflectionally; it is also commonly called "the simple past-tense". And there is a secondary past-tense called the perfect, which is marked analytically (it is marked by "HAVE" + past-participle). Both past tenses are commonly used for three main usages: past time, modal remoteness, backshift. (Related info in 2002 CGEL, page 139.)
I find that sometimes it helps to construct an open conditional version (if possible), analyze it, and then create a remote conditional version for that (if possible).
CAVEAT: I just realized that your excerpt might be fiction prose, written in past-tense narrative mode. So, if it is, then the version you used in the excerpt is the only version you can use--because of the established conventions of fiction writing.