In the sentences with the correlative conjunction ‘hardly…. when’ which is used in the form of inversion, the helping verb comesimmediately after ‘hardly’. Hence, ‘hardly I had’ must be replaced with ‘hardly had I’. Thus, option (a) is correct.