Well spotted! The three possibilites for "together" are:
S: gyda'n gilydd / N: efo'n gilydd - when referring to "us"
S: gyda'ch gilydd / N: efo'ch gilydd - when referring to "you"
S: gyda'i gilydd / N: efo'i gilydd - when referring to "them"
Dyn ni gyda'n gilydd nawr "We're together now"
Ers faint dach chi efo'ch gilydd? "How long have you been together?"
Dyn nhw ddim yn gweithio'n dda gyda'i gilydd "They don't work well together"
The spelling of the last one is unusual. You'd expect *'u as a contraction of eu rather than 'i, but actually only 'i is correct. It's a mistake first language speakers sometimes make when writing too.
If however you remember that ei and eu are both pronounced "i", even up north, it's not so strange. Many Romance languages have the same words for "his, her, their" - just like colloquial Welsh.
As an aside, the possessive pronouns/adjectives are a funny bunch in Welsh as their colloquial pronunciations differ to their spellings:
fy is usually said "y(n)"
ei and eu are both "i", even up north
ein is "yn"
eich is "ỳch"
GPC explains this anomaly is partly down to a 16th century Welsh scholar, William Salesbury and translator of the New Testament into Welsh. He coined the spellings of ei, eich etc. based on Latin eius. Guys in those days often thought Latin was amazing so decided their language should try and be more similar to it, for some reason. (The same happened in English with the Latinisation of words like dette to debt, sisoures to scissors sithe to scythe etc.) And because Welsh orthography is pretty regular, people began to pronounce the possessive adjectives as they were written in formal contexts, thinking they were right.
Cilydd is literally "fellow, companion, one of the same kind". It's not a word that's used nowadays except in expressions like gyda'i gilydd "together", more literally "with his companion". I'd just learn these three as set phrases:
gyda'i gilydd "together" when referring to nhw "them"
gyda'ch gilydd "together" when referring to chi "you"
gyda'n gilydd "together" when referring to ni "us"