The other student corrected Robert because he better understood the problem.

Who is "he" in this prior sentence?
The other student
Shigeru Miyamoto was the mentor of Satoshi Tajiri, so he taught many things.

Who is "he" in this prior sentence?
Shigeru Miyamoto
The spider ate the fly because he looked tasty.

Who is "he" in this prior sentence?

the fly