Hey Brother How are you doing, it's not a big deal don't worry look
To be in the past is were/was yeah we all know that but
in the conditional type 2 (If+past simple + would + verb in infinitive)
in this case To be is always (were) whatever the subject is
We can use 'were' instead of 'was' with 'I' and 'he/she/it'. This is mostly done in formal writing). some people think that we can use was but to avoid problems in writing just do it as it's explained before and as Brother محمممد told you
I hope this will stop the explosion of your head