"उन्होंने मुझसे पूछा मेरा नाम क्या था।"
अनुवाद:They asked me what my name was.
Here, Duolingo has translated the English sentence same to same in Hindi. Duolingo should know that the construction varies from language to language.
The correct Hindi sentence for the translated English sentence is- 'उन्होंने मुझसे मेरा नाम पूछा।'
Duolingo should learn Hindi grammar first.
They asked me what was my name This is also correct but the apps is showing its wrong. Try to update your apps if there is multiple way of translation that may be correct