He is the best boy in the class.

  1. He is the best boy in the class.
  2. He is the better boy between them.
  3. He is the better boy in the class.
    What about the above sentence?

of the three I find the first sentence to be correct

if there is a comparison to be made then better is usually limited to two as in “you are better than me” or “of the two I consider the first to be a better choice”

same goes with sentence three - class refers to a large number

He is the better boy between Rahim and Karim.
What about the sentence?

That would have to be
'He is the better boy of the two: Rahim and Karim.