Continuity mistake: When David is making breakfast, he turns around, with a frying pan full of pancakes in his hands. In the next shot, he begins to lift up a pancake with a spatula, but when it cuts, he's already holding it out. (00:03:15)
Continuity mistake: After Mary Margaret opens the birthday present from Johanna, the wrapping, lying around the present, changes position a couple of times. (00:03:55)
Answer: He knows who she is because he knows that the fairy tales are true. He was also shown to sneak out to go see Emma or someone else. Sometimes he succeeded, sometimes he didn't. This is how he knew to look for her despite his strict mother.