PIE word
*téh₂m
The noun is borrowed from Latin tandem (“of time: at last, at length, finally”), applied humorously in English to two horses harnessed “at length” (that is, in a single line) instead of side-by-side. Tandem is derived from tam (“so, to such an extent”) + -dem (demonstrative suffix).
The adjective, adverb, and verb are derived from the noun.