genitive plural pronoun + instrumental singular pronoun (contraction in sandhi)
Analysis. tesaṁ (genitive plural of ta, 'that/those') + mayaṁ (instrumental singular of ahaṁ, 'I'), contracted in sandhi: tesamayaṁ. The phrase typically appears in narrative passages meaning 'at that time, then' or in a temporal/circumstantial sense.
Meanings from the Digital Pāḷi Dictionary; morphology and etymology by Claude.
Lite mode — plain HTML for e-readers and old browsers. Full version