It's because "tri" is the object of the short form verb "Ga" (from "Cael") and this causes a soft mutation. "Coffi" undergoes aspirate mutation because it comes after "tri". (there are Brief notes at the beginning of this topic which state "Mutations after un, dau/dwy, tri, chwe" although this isnt too helpful as it doesn't state which type of mutation). The soft mutation after "Ga i" it taught in the notes of unit "May I?".
The skeleton explanation in the notes for 'Numbers 2' has now been expanded to explain the mutations - https://www.duolingo.com/skill/cy/Numbers2/tips-and-notes
I'm not sure where they are discussed in the notes, but since it's a pretty uncommon mutation I can give a pretty comprehensive explanation here (Which you could always copy and paste in to a word document for quick reference).
Firstly, only three letters have aspirate mutatons, these are "T, C and P", and the easiest way to remember their aspirate mutation is to just add an "h" after them, i.e "Th, Ch and Ph". Always look for "Ph" words under "P" in the dictionary since no words begin with it in their base form.
The first rule I'll explain is the one above. "Tri" causes an aspirate mutation on nouns that follow it (This is not the case with "Tair). So "Tri chi" (Three dogs) but "Tair cath" (Three cats). Unlike German and French the definite artrticle doesn't change for gender so the best way to learn gender is to look it up as you learn a word, then pair it with an adjective (use the same one for masculine nouns and another one for feminine nouns) and this may help you remember the gender. "Chwe" is the only other number that causes an aspirate mutation but since it is not gendered it causes a mutation on both masculine and feminine nouns e.g "Chwe chi a chwe chath".
The second rule is that "ei" causes an aspirate mutation when it means "her" i.e "Ei thŷ" (Her house). This is key to the meaning as "Ei" (his) cause a soft mutation i.e "Ei thŷ ac ei dŷ" (Her house and his house).
Thirdly, after the words a, â and tua. So to use an example sentence: "Torodd hi lysiau a chig â chyllell tua thair gwaith" (She cut vegetables and meat with a knife about three times). The mutated words being "Cig" (Meat), "Cyllell" (knife) and "Tair" (Three).
Finally and probably the least self explanatory is at the beginning of negative statements. I say this because "T, C and P" mutate aspirately in this instance and all the other mutateable letters mutate softly. This happens as a particle that used to be used at the beginning of negative statements is now not used. For example what was once "Ni thalodd y merch am ei photel" (The girl didn't pay for her bottle) is now "Thalodd y merch ddim am ei photel".
The course notes are there to help. For 'Numbers' for example, See https://www.duolingo.com/skill/cy/Numbers-1/tips-and-notes and https://www.duolingo.com/skill/cy/Numbers2/tips-and-notes
To see how to find the course notes generally, go to https://forum.duolingo.com/topic/924/hot and read the discussion 'Course tips and notes'. The 'duome' link there is useful for browsing all the notes in one place. We recommend reading the notes for each new section as you start it.
Otherwise, a good grammar book is ‘Welsh Rules’ by Heini Gruffudd - that covers levels of Welsh up to Uwch/A level, but it is progressive in how it introduces topics. Another, simpler one which may still be available, new or used, is the BBC’s ‘Grammar Guide for Learners’ - there may still be a printable version on their archived ‘Learn Welsh’ web-site, although the layout and font of that version is not the best.
There are several pointers to the gender of nouns, but they nearly all have common exceptions. It is best to learn them as you go along, along with the plurals. If you write out your vocab to practise it, or if you label things around the house, etc, make sure to include a note of whether the nouns are feminine and of their plural forms. If you just assume that nouns you are not familiar with are masculine, you will be right about 70-75% of the time, apparently.
It just takes time and practice! A little every day works best - avoid binge learning or cramming.
Mutations are first formally introduced in "May I?" and are mentioned in the notes for the following: Colours, Numbers 2, Weather, Time, Possession gyda/gan, Countries, Travelling, Past mynd/dod/cael 1, Family, Past mynd/dod/cael 2, Past gwneud 1/2, Past short, Auxillury Past Gwneud and this is just within the first 39 modules of the course. As for masculine and feminine nouns you will need to learn them as you go along, either working it out from the sentence or looking it up in a dictionary, there are some hints as to the gender of a word, for example if it is refering to a feminine things i.e "Dynes, merch and buwch" (Woman, girl and cow) are all feminine due to their natural sex. The ending "yn" is almost always masculine and "en" almost always feminine.