Translation:Did you finish your homework?
These are sentences which might be helpful: https://jisho.org/search/%E7%B5%82%E3%81%88%E3%82%8B%20%23sentences
I can try and give some explanation here! The quick and dirty tip for telling the difference is that 終わる is pretty much always going to be paired with が or は while 終える is always going to be paired with を. This is because 終える is a transitive verb and transitive verbs take direct objects, while intransitive verbs don't.
What this means in context is that 終える really means "to finish something." Stealing part of an example from the link Ikoroshia posted, 学生はテストを終えた means "The student finished the test," where "student" is the subject doing the action and "the test" is the direct object, the thing being finished. On the other hand, 長い夜が終わった means "The long night ended," where "long night" is the subject doing the action and there is no direct object. The night isn't ending something, it's just ending, so we use the intransitive verb.
Of course, those two examples I used also correlated to our general usage of transitive and intransitive verbs in English. But the problem comes when we and the Japanese would say something differently, so we translate in English how it makes sense to us, like in this Duo example. 宿題は終わりましたか？ means "Did the homework end?" which is intransitive, but that doesn't sound natural to us in English, so we translate it to "Did you finish your homework?" which is transitive. So you'll just have to know that the distinction isn't always clearly preserved in English. But in general, it should be helpful to know that transitive verbs act on something while intransitive verbs just act by themselves, so if it has the direct object particle を before it it's probably transitive!
The particle doesn't have to change when you ask a question. 「しゅくだいはおわりましたか？」"Did you finish your homework?" 「しゅくだいはおわりました」 "I finished my homework." As sultanofswingJ explained very well, the reason は "wa" is used instead of を "wo" is because owaru is an intransitive verb. Intransitive verbs cannot take direct objects (a direct object would be indicated by を "wo"), so homework is the subject of the sentence ("subjects" are indicated by は "wa" and が "ga").
Because the verb 終わる (おわる) means "to finish." The literal translation of this question is more like "Was the homework finished?" "Did you do your homework?" has the same meaning, true, but Duolingo is looking for you to know that 終わりました means "finished" specifically, not "did."