daear = earth
-ydd denotes a specialist or someone especially connected... so, deaerydd = geographer ("earth-specialist") (compare: llyfrgell = library [literally, book-cell]; llyfrgellydd = librarian ysgrifennu: write = to write; ysgrifennydd = secretary)
-(i)aeth makes an abstract noun, an idea, an activity etc. so, daear+ydd+iaeth is "earth-specialist-activity", what it is an earth-specialist (geographer) does! (compare: gwerin = the people, the folk; gweriniaeth = a republic)
Duolingo is perhaps being a little bit harsh there, but strictly speaking they are right: if you were using "daearyddiaeth Sbaen" in a sentence it would correspond to "the geography of Spain" (or "Spain's geography") in English. E.g. Dw i'n ysgrifennu llyfr am ddaearyddiaeth Sbaen / I'm writing a book about the geography of Spain; Mae daearyddiaeth Sbaen yn amrywiol iawn / Spain's geography is very varied.