'Gan' is used to show possession by a person. eg 'Mae pannas gan Owen' (lit:- there are parsnips with Owen) = Owen has parsnips
Gen i, gen ti, gynno fo etc are forms of 'Gan' linked to various pronouns. (with me. with you, with him etc.)
So you could have a sentence replacing Owen with the pronoun:- Mae pannas gynno fo ( there are parsnips with him) = he has parsnips. This is a perfectly valid sentence using North Wales forms.
However in speech for most dialects, which the Duolingo course reflects, the word order is changed to give:- 'Mae gynno fo bannas' which introduces a soft mutation although the meaning is exactly the same.
The version in South Wales is much easier because 'gyda' is used in all patterns.
There is further explanation here:- https://www.duolingo.com/skill/cy/Possession
gan is a preposition which is conjugated by person. There are a few variations in use, but here is a common version:
- gan Siôn, gan y plant, etc - the basic form, with no conjugation with nouns, names, etc
- gen i - note change of -a- to -e-
- gen ti
- ganddo/gynno fe/fo
- ganndi/gynni hi
- gynnon ni
- gynnoch chi
- ganddyn nhw
(In the formal language there are other variations which are generally used without the pronouns i, ti, etc.)