Esta bien porque el tercer condicional se utiliza esto :
The Third Conditional
if + past perfect, .
Would + have + past participleIt talks about the past.
It's used to describe a situation that didn't happen, and to imagine the result of this situation.
If shehad studied, shewould have passedthe exam (but, really we know she didn't study and so she didn't pass)If Ihadn't eatenso much, Iwouldn't have feltsick (but I did eat a lot, and so I did feel sick).
If wehad takena taxi, wewouldn't have missedthe plane
Shewouldn't have beentired if shehad goneto bed earlier
Shewould have becomea teacher if shehad goneto university
Hewould have beenon time for the interview if hehad leftthe house at nine.