Are "Mary" and "she" the same in this sentence?
Ann asked Mary what time the library closes, but *she* had forgotten.
yes