"i" is both a pronoun that means "I/me" and is a preposition which means "to" (which is also used in a lot of phrases where "for" would be used in English). So in a sentence where you are talking about yourself going to somewhere you are going to end up with the same word twice since the word has two meanings.
Though to offer some explanations. "Mi" is (in this instance) an untranslatable verbal particle. It is not necessary in the modern language though is common in the north, it is only used at the start of positive sentences, and it causes a soft mutation. "Do" is "yes" in response to a question in the past tense e.g "Wyt ti wedi mynd?" (Have you gone?) is answered either "Do" for yes or "Naddo" for no. As in English there are a few different forms of the past tense. I'm not fully aware of the names though I'll do my best to equate the Welsh past tense to an English past tense. Firstly "Dw i wedi"isform is "I have", using "Roeddwn i" is "I was". Other than that you also can conjugate verbs into the past tense e.g "Es i" "I went". There are regular ways of conjugating into this version of the past tense though "mynd" (To go) is irregular in this tense.