How did Teresa know Thomas's name when she wakes up in the lift in The Maze Runner, and how did she remember her own name when the others couldn't?
Her name, she just remembered earlier than everyone else. While the others used to take days to remember, her name came in hours or minutes.
Could be also, since she was working for the wicked, that she just took a smaller portion of whatever they were working with to erase the memory.
Now Thomas's name, I think she just had dreams/visions about him, just like Thomas had visions/dreams about her.