The question answered here as follows,
She doesn't, exactly. The whole experience is in his head, and it was
the memory of her that told him to go to Montauk.
We are supposed to take a guess at what her memory erase experience
was like, and assume that she had a similar experience to his, so
maybe when they were clearing her memory, he said the same thing to
her. But remember, she did it weeks before he did, so the real
question is: how did they know to come on the same day? Fate, maybe?
Montauk was an important place in their relationship. That's where
they had a night picnic on the frozen pond, and they were very close
at the time... which is important because it was shortly after that
when their relationship went sour. It suggests that there are some
things that cannot be forgotten, no matter how powerful the science
used against it may be, especially with memories tied to very strong
emotions like Love.