There is no short answer, so I have given a very long answer on the almost identical sentence here.
Another way to look at it is that whenever you have an arbitrary boundary -
When does a boy become a man?
When does a girl become a woman?
When does a woman become a wife?
When does a leg become a foot?
When does afternoon become evening?
When does blue become green?
you are bound to have some differences between languages. And I have chosen these examples specifically because they are all ones where there is a difference between Gaelic and English.
Bean sometimes translates as woman, and sometimes as wife (both terms which themselves have a range of meanings)
Cas sometimes translates as leg and sometimes as foot
Feasgair sometimes translates as afternoon and sometimes as evening
Green is sometimes uaine and sometimes glas, which is sometimes blue (which is sometimes gorm) or sometimes grey, which is sometimes liath.
So there are no hard-and-fast rules. Only context will tell, but typically you would need to be a bit older or in a more adult situation (e.g. married, or with a job) to be a bean than to be a woman. Certainly boireannach is used to translate the very specific use of woman you get in news reports where it is precisely defined as 'adult female with no further implications'.
That means that, in the absence of context as on Duolingo, they have to accept both, but it does not mean that both would be appropriate in any real-life situation. D
The feminine singular definite article ('the') causes lenition - the insertion of the h after most initial consonants. When the h is inserted, an changes to a'.
That's the rule, but as for the 'why', the lenition is a set of sound changes that happened after words that used to end in a vowel. Spanish, Italian and German all demonstrate this feature that the feminine singular article ends in a vowel but the masculine doesn't. As for why the an changes to a' we just have to assume it was easier to say - it doesn't happen in Irish.