Prepositions с, к, в have forms со, ко, во used before consonant clusters. Usually they're optional (во дворце́ could be в дворце́ too, although the latter is used not so often).
There's one case when they're absolutely required: when the next word has a consonant cluster in the beginning, but other form of the same word has a vowel (о, е or ё) that breaks this consonant cluster. E.g. «во мне» 'inside me', because there's a form «меня»; «со льдом» 'with ice', because there's a form «лёд»; «во сне» 'in a dream, while sleeping' because there's a form «сон».
The preposition «об» is really unique, because it has a form «обо», but it's used before a limited number of words like «обо мне» (mostly before pronouns); and before other consonant clusters (and, in fact, before consonants in general), a different form «о» is used: «о сне».
'Castle' is «за́мок», 'palace' is «дворе́ц».
I'm not good at architecture or anything, but to me «за́мок» means a primarily defensive building (with strong walls and things like that), and «дворе́ц» is primarily decorative.
Actually, people from Moscow quite often pronounce their o's to sound like a's, so this is something you will hear a lot in practice. So, я хочу might sound more like 'я хачу,' and in this example, you can hear that во дворце sounds like 'ва дварце.' This particular case is not necessarily a pronunciation error by Duo; it may be indicative of a Moscow accent.
Basically, «Во дворце гости» is a sentence about the palace: the palace is a something known to the reader, and new information is that there are guests there. «Гости во дворце» is a sentence about guests: 'the guests' are something known to the reader, and new information is that they are in the palace.
You could place new information in the beginning by emphasising it with intonation. E.g. «Гости во дворце» (with «гости» emphasised by intonation) means roughly the same thing as «Во дворце гости». But such inverted word order is not stylistically neutral (it adds a bit too much emphasis to the moved word), it's not used as often as the neutral one, so Duolingo generally doesn't accept such sentences.
Here's an explanation from the Wikipedia article "Topic and comment":
So-called free-word order languages (e.g. Russian [...]) use word-order as the primary means [for indicating what is new information — šeraja_žaba]. Usually the topic precedes focus. However, for example in Czech [in Russian too — šeraja_žaba], both orders are possible. The order with comment sentence-initial is referred as subjective (Vilém Mathesius invented the term and opposed it to objective) and expresses certain emotional involvement. The two orders are distinguished by intonation.
People learn languages for different reasons. Some are doing it because they hope to visit the country in question one day. There are villages in Russia. And for tourists words like "palace" might be even more relevant than, say, "grandmother". Of course for those who learn Russian in order to be able to talk to their Russian relatives it's other way around. The thing is that Duo can't predict your personal needs and doesn't have to cater to them specifically.