Revealing mistake: Hook's wire is visible as he climbs in Rapunzel's castle. (00:10:05)
Revealing mistake: When Detective Rogers is chasing Naveen, in several wide shots, the person running isn't Colin O'Donoghue, but his stunt double. (00:25:50)
Revealing mistake: When Emma and Hook arrive at Regina's coronation with their infant daughter, as they enter the room, Hook is holding a doll and not a real baby. (00:38:25)
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.