The correct answer is (B) had collected.
The sentence uses Past Perfect tense because collecting tickets happened before reaching the counter (an earlier past action).
When two past actions occur, the earlier action uses Past Perfect (had + V3). "Had collected" shows the tickets were bought before arriving — making (B) the only correct choice. Options A (Present Perfect), C (Simple Present), and D (Future) are all grammatically and contextually wrong here.