Past perfect is used when you're talking about something that happened in the past (the not playing for two years part) and you want to reference an event even further back (the injury part). Simple past could be any point in the past. If you use simple past, the sentence could be interpreted as the person having injured himself yesterday, and that injury somehow causing them to be unable to play for the prior two years. (This makes no sense, so you are able to "puzzle out the meaning" of the sentence by rejecting the obviously false interpretation and settling on one in which injury occurs first.)
As a general rule, the goal on tests is not to select 'a correct answer', but to select 'the best answer'. You should also not select an answer that is correct if viewed from a certain standpoint, but rather the answer that is obviously correct all of the time. The use of simple past in your example results in the reader needing to use common sense to place the injury before the convalescence in time. With past perfect, the reader need not ponder the order. Since past perfect requires no puzzling out the meaning (even if it is obvious), it is the better, and thus correct, answer.