The correct option is C had been playing
Here, 'had been playing' in present perfect continuous is correct because it
is used to indicate an action that started at some point in the past and may or
may not be complete. Here, 'for two hours' indicate an action that started at some point in the past.
'Is playing' in present continuous is incorrect because
it implies an action going on at the time of speaking.
'Had played' in past perfect is incorrect because
it is used to indicate a completed action of the past that happened before
another event took place.
'Has played' in present perfect is incorrect because
it is used to indicate an action which started in the past and has continued up
untill now.