To form the imperfect active subjunctive, you take the perfect active infinitive of a verb and you add endings that are (almost) identical to the usual present active indicative verbs. For example, the 3rd person singular active subjunctive of 'amo' would be amare + t = amaret. Similarly, for the imperfect passive subjunctive, you take the present active infinitive and add the usual present passive indicative endings (e.g. 3rd person singular passive subjunctive of 'amo' would be amare + tur = amaretur)