I think that Duo wants us to know that Peter has the ability to not sleep, not that he is forbidden to. He CAN not sleep: वह नहीं सो सकता है। He can't sleep: वह सो नहीं सकता है। but that's a wild guess...
can someone explain why the hai applies sometimes in the first part of a compound sentence and sometimes is at the end of the second part of the compound sentence