A. Melanie asked me where I bought those shoes.
B. Melanie asked me where did I buy those shoes.
C. Melanie asked me where had I had bought those shoes.
D. Melanie asked me where I had bought those shoes.
Feedback Melanie asked me where I had bought those shoes.' - this is the right word order in Reported Speech for special questions. We add 'where' before a pronoun and then place the auxiliary verb. Here we change the Present Perfect into the Past Perfect.