Step 1: Identify the type of sentence.
The given sentence is an interrogative sentence (a question). While converting to indirect speech, we need to change the reporting verb and also adjust the tense.
Step 2: Change of reporting verb.
The reporting verb “said to” is changed to “asked” because the teacher is asking a question.
Step 3: Pronoun and tense change.
“you” becomes “I” (since the teacher is speaking to me).
The tense “are going” changes to “was going.”
Final Answer:
The teacher asked me where I was going.