This would be a little different in Romance languages, which have inflectional systems and you can have both perfect and imperfect tenses, and for the synthetic perfect tenses, you could inflect the "have" part differently depending on quite how you meant it. But English only has modals, which don’t really map to that sort of thing cleanly.
> “I thought she had a good chance to get on the medal stand,” Dunn said Monday. “And if she got a good jump, I thought she might have had a chance to win it.
> I thought she [was having] a good change to get on the medal stand. And if she [did get / were to get] a good jump, I thought that [would have had /might have had].
So why the second had at the far set.
Because this is a hypothetical about something that is already completed.
It isn’t mandatory that the second one be "would/might have had" instead of simply "would/night have", but by putting in in the perfect construction, you make it a past hypothetical much more clearly.
Because the whole thing is done and gone.
It is no longer a possibility.
The perfect aspect indicates that everything is all over with.