"Peter is sleeping for four hours."
Translation:पीटर चार घंटे से सो रहा है।
The English translation is not clear here. It is in the present continuous, which means it could still be happening in the future (i.e. Peter has slept two hours and will be sleeping for a total of four hours). But the Hindi sentence wants us to say that he has already been sleeping for four hours. A better English translation would be "Peter has been sleeping for four hours" . This would convey the correct meaning. Which is the purpose of language.
The English sentence means "Peter is sleeping now, and will be sleeping in the future, until he has slept for a total of four hours"; the meaning in Hindi is totally different. The people who wrote this course seem to often be using an informal variety of Indian English, which uses tenses in ways that are ungrammatical in all other English varieties. Even more problematically, the course does this inconsistently and unpredictably, so it's impossible to know what the English sentence means before you see the Hindi... It would be great if someone could fix the English sentences!
You're right, the translation is a little wonky here, a better translation would be "Peter has been sleeping since four hours ago" but in Hindi the term "Has been" doesn't exist, it's replaced instead with the present continuous form, so मैं दो साल से हिंदी सीख रहा हूँ = I have been learning Hindi for two years, or I have been learning Hindi since two years ago (The second form is how it's said in Hindi, hence से (Since))
The 'has been' form (present perfect continuous) does exist in Hindi. It would be 'पीटर चार घंटे से सोता रहा है। ' But it seems like overkill here because Hindi is much laxer compared to English when it comes to substituting the present continuous form in its place when there is no ambiguity. It is only used in sentences like मैं अब पढ़ रहा हूँ और सुबह से पढ़ता रहा हूँ। (I am studying now and have been studying since the morning)