The Garden of Forking Paths - S7-E3
Continuity mistake: In this episode, Henry, Regina and Nook (New Hook), arrive to meet up with Cinderella to join the resistance against Lady Tremaine. In the previous episode, Emma and Hook announced they were expecting a child. No issues there, except that in the last episode of the season Henry and Cinderella have Lucy who is about 10 years old, but Emma and Hook make an appearance with a newborn baby girl. Their daughter should be older than Lucy, since she was pregnant before Henry even married Cinderella. (00:11:13 - 00:38:27)
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.