"Both Julia and Neha have to sleep but Peter has to play."
Translation:जूलिया और नेहा दोनों को सोना है लेकिन पीटर को खेलना है।
English: (subject) has (infinitive). E.g. "Julia has to go".
This gets structured differently in Hindi. Grammatically, the infinitive functions like the subject of the sentence and the verb agrees with the infinitive. What English speakers consider the subject is used more like an indirect object.
If you take that example "Julia has to go", and translate it to Hindi, you get "जूलिया को जाना है". If you do a literal word-for-word translation back to English, it comes back like "to Julia to go is".
To remind myself how this is structured differently, I think of "to Julia to go is" as shorthand for "to Julia the duty of going falls" or "on Julia the obligation of going is".
N.b. Though "Julia" becomes an indirect object of sorts, in some aspects she is still the subject of the sentence. If you wanted to say "Julia has to read her book", then you'd use अपनी for "her" instead of "उसकी". I.e. "जूलिया को अपनी किताब पढ़ना है"
Bottom line: whenever you're saying "has to" or "have to", it doesn't matter if the subject is "I", "you", "he", "she", "they", ... The verb at the end is always going to be है. It's always third-person singular because it's agreeing with the infinitive, not with the logical subject.
I wish they had tips and notes for this skill. I'm sure they would have said that better than I did. But I hope this helps.
Regarding "aapko sona hain", when I'm trying to decide which of two ways is correct, I'll google for both variants and see which produces more hits.
I just searched for "आपको सोना है" ("aapko sona hai") and got 2210 hits. When I searched for "आपको सोना हैं" ("aapko sona hain"), I got two hits.
Its fine. In fact when using the word दोनों , it's generally used at the beginning of the sentence anyway. Just like the English translation.
Also, in a real life situation Peter would "want" to play not "have" to play. Hey Duolingo. This example should be changed as follows:
"Both Julia and Neha have to sleep but Peter wants to play. "
"दोनों जूलिया और नेहा को सोना चाहिए मगर पीटर खेलना चाहता है।"
There are numerous languages spoken in India. This map shows where each language is most common: https://i.pinimg.com/originals/98/a4/4d/98a44d67a68058ce29ac41e02dcb6426.png
A friend of mine who grew up speaking Bengali and English learned Hindi when her family moved to an area where Hindi was prevalent. More precisely, that's when she chose to get good at it. All educated Indians have had Hindi in school, and she was no exception. But until there's a practical need to learn a language, a daily 45 minute class in that language won't actually have you speaking the language.