It's not a matter of order -- you have to use the one that matches the word that comes after it.
It's a bit like "a" versus "an" -- they mean the same thing but you can't say "a apple" or "an box".
You have to use der with a masculine noun, die with a feminine noun, and das with a neuter noun.
The noun Frau is grammatically feminine and Mann is masculine.
I may have a solution to some of your problems, if you text the answer correctly but you get it wrong for some reason, just copy and paste the answer it gives you than do it again and this time paste the right answer, and you should be able to pass the course without having to report the problem to Duolingo, even though they do nothing to fix the problem.