"막차는 몇 시야?"
Translation:What time is the last train?
I'm not sure why you would think that. You can definitely ask a friend or a sibling or some other person you know that question. Regardless, if you've been following this course, you must have noticed that Duo often uses sentences that you'd probably never use in real life. In addition, they randomly/arbitrarily use different politeness levels to reinforce the lessons
In "막차", "차" is refers not only to train(기차) and also to land public transportation as a whole, such as bus(버스), subway(지하철), taxi(택시=cab) ... etc.
Therefore, almost means of public transportation can be the answer. So, in order for that answer to be correct, the "기차(or 열차 = train) should also be added in KR sentences. [e.g.: 기차의 막차는 몇시야?]