Ambi asked:

Hi, I hope you can help me with this please. It is a riddle that has
been given to me, that I am finding impossible to answer:Who is the most intelligent person, the one who cheats and passes the exam or the one who cannot cheat and fails?

I see what this question is getting at but the riddle is, like most riddles, a consequence of it being a rather confused one. Cheating and not-cheating at exams is not a dependable measure of intelligence. Professor Moriarty seems to have been just as intelligent as Sherlock Holmes. Everything would depend on the circumstances. The person who did not cheat may have had less to lose by failing, and may have cheated if put in the other person’s place.

We cannot assume that the circumstances were the same for both exam-takers, as we would for a physics experiment, for these circumstances would have to include their personal history, their state of mind, their motivation and so forth, and we would end up having to define them as being in effect the same person, and then they would not make two different decisions.