Old English þær "in or at that place, so far as, provided that, in that respect," from Proto-Germanic *thær (source also of Old Saxon thar, Old Frisian ther, Middle Low German dar, Middle Dutch daer, Dutch daar, Old High German dar, German da, Gothic þar, Old Norse þar), from PIE *tar- "there" (source also of Sanskrit tar-hi "then"), from root *to- (see the) + adverbial suffix -r.
Interjectional use is recorded from 1530s, used variously to emphasize certainty, encouragement, or consolation. To have been there "had previous experience of some activity" is recorded from 1877.
Old English æfter "behind; later in time" (adv.); "behind in place; later than in time; in pursuit, following with intent to overtake" (prep.), from of "off" (see off (adv.)) + -ter, a comparative suffix; thus the original meaning was "more away, farther off." Compare Old Norse eptir "after," Old Frisian efter, Dutch achter, Old High German aftar, Gothic aftra "behind;" also see aft. Cognate with Greek apotero "farther off," Old Persian apataram "further."
From c. 1300 as "in imitation of." As a conjunction, "subsequent to the time that," from late Old English. After hours "hours after regular working hours" is from 1814. Afterwit "wisdom that comes too late" is attested from c. 1500 but seems to have fallen from use. After you as an expression in yielding precedence is recorded by 1650.