The word <em>wishing </em>is used as a participle in this case. Although gerunds and participles look the same, they are used in different senses - gerunds generally denote nouns, whereas participles have more of an adverbial meaning.
Answer:
B
Explanation:
It was one of his last words.
The answer would be “but” since it contrasts his motivation with competing with others for a high score.
Hopefully this helped.