Translation:There is a good restaurant to the right of the hotel.
On is not correct grammatically. However, in casual conversation, you were going to see this all the time. As a purist, I would say that it is incorrect, but pragmatically, there really isn't anything wrong with it. For purposes of this course, I actually appreciate Duolingo being more strict here.
In fact, it is "справа" that means "to the right" (location: could also be translated "on the right" if alone by itself). So the "to" in the sentence does not come from "от" at all.
So "от гостиницы" means as you say "from the hotel". So справа от гостиницы is literally "to the right from the hotel" or "on the right from the hotel" (you can think of it like: "When calculating positions FROM the hotel, it is on the right"). Of course, this idea in English is written using "of" instead of from, so we arrive at the English translation: "to the right of the hotel".
I wrote: "there is a good restaurant
on the right of the hotel," and Dou didn't accept my answer. I was looking for a rule. And:
If you are moving, then use TO, for example, "When you have gone 20 steps, look to the right". If you are talking about location, use ON, for example, "There is a river on the right" or "There is a good restaurant on the right of the hotel". Is this correct? English native speakers please help me