The correct answer is B. was.
The sentence “When I saw him, he was playing chess” is in the past tense. This means that the action of playing chess happened before the time of speaking. The other options are not in the past tense, so they are not correct.
A. is is in the present tense. This means that the action of playing chess is happening now.
C. will is in the future tense. This means that the action of playing chess will happen in the future.
D. shall is a formal way of saying will. It is not often used in everyday speech.
I hope this helps!