The correct option is
A Had, been worrying
NOTE: As the person was late, the act of 'worrying' must have continued until he came back. As the action 'worrying' stopped when the person returned, we will use the past perfect continuous tense to fill in the blanks.
As it is a question, the helping/auxiliary verb will be placed in the beginning and the verb after the pronoun.
Option B - 'Were, being worried' is used to represent a sentence in the past continuous tense. Hence, option B is incorrect.
Option C - 'Did, be worried' is grammatically wrong here, as the sentence already has a verb, As we need the sentence to be in the past perfect continuous tense, we can't use 'did' and 'be worried' here. Hence, option C is incorrect.
Option D - 'Had, being worrying' is grammatically incorrect as to form a sentence in the past perfect continuous tense, we need 'been' and not 'being'. Hence, option D is incorrect.
Option A - 'Had, been worrying' can be used here to represent the sentence in the past perfect continuous tense. Thus option A is the correct answer.
'Sorry, I was so late last night. Had you been worrying about me?'