The correct option is C In
To do something 'in the nick of time' means to be able to finish something just before the deadline. This, in the context of the sentence, it means he scored the goal just before the timer ran out. The correct answer here is 'In', making Option C) the correct answer.