Given the following context

James asked Robert for a favor but *he* refused.

Are "Robert" and "he" the same?
yes