The answer is <em>the tire </em><em>went</em><em> flat</em>
Explanation:
When we have two or more events happening at the same time, we should be using the same verb tense to express it.
From the given sentence, we see that <em>riding the bicycle</em> and <em>the tire going flat</em> happened one after another, so both verbs should be in the same tense. However, we have the verb <em>rode</em> which is past tense and the verb <em>goes</em> which is present tense. Occurrence of these verbs in different tenses is called <em>verb shift</em> and it is usually considered a bad grammar, so to correct it we need to change the verb <em>goes</em> to its past simple form because both of these activities happened in the past.