"Тогда" is basically the same as English "then". It can refer to past events and be used in "if...then" constructions.

"Ни они ей, ни она им"
Neither she [need] them nor they [need] her. (It's addition to previous sentence)