Change into indirect speech.
The teacher asked him," where did you go yesterday"?
AThe teacher asked him where he had gone the previous day
BThe teacher asked him where he has gone the previous day
CThe teacher asked him where he had been going yesterday
DThe teacher asked him where he was going yesterday