"Baku and Riga"
me: starts Arabic duolingo course
duolingo course: actually teaches Arabic sentences
[surprised pikachu face]
that's a mistake. cuz it's just a city name there should be just Riga
not Riajan. un is used in nominative case and indefinite names both.
an is used after verbs (without prepositions) and in case you wanna make an adverb