Romeo discovers Juliet's identity almost by accident. The nurse pulls Juliet away because Juliet's mother has been asking for her. Romeo asks the nurse, "What is her mother?" The nurse responds she is Lady Capulet, and Romeo knows the trouble he is now in:
Is she a Capulet?
O dear account! my life is my foe's debt.
Juliet is more calculating. She pulls the nurse aside and coyly asks the identity of a few of the young men, so as not to display her interest in Romeo. The last one she asks about is Romeo. The nurse does not know, and so is sent to find the answer. She comes back with the news that he is a Montague. Here is her reponse: