Correct option is C
The segment "get on the train by Mumbai" contains a grammatical error.
• The correct verb tense should be "got on the train to Mumbai" to match the tense of the rest of the sentence.
• Additionally, the preposition "by" should be replaced with "to" as it indicates the destination.
• The corrected sentence is: "I had walked for most of the day to Kanpur and then got on the train to Mumbai."