Mrs. Allan is the new minister's wife who arrives in Avonlea about halfway through the story. She also teaches Anne's Sunday School class. Miss Stacey is Avonlea's new schoolteacher who arrives around the same time.
Both are young, sympathetic, smart, and fashionable women, so naturally, Anne wants to be like them when she grows up. Their example makes Anne work harder and, in Mrs. Allan's case, take her religious life more seriously.
Mr. Phillips, a presumably young man, is the Avonlea schoolteacher before Miss Stacey comes to town. He isn't a very good teacher, either. He punishes Anne by making her sit on the boy's side of the classroom, and spends most of his time with Prissy Andrews.