Peter calls Anne "Mrs. Quack Quack" because she talks a lot.
Anne and Peter get along well at times, but often clash. They are the closest kids in age in the Secret Annexe, because Margot is older than them. They were not especially close before Peter’s family joined Anne’s in hiding, but knew about each other.
Peter has heard about an incident where Anne’s teacher called her Mrs. Quack Quack, and uses the nickname to tease Anne when she gets on his nerves.
PETER. I heard about you ... How you talked so much in class they called you Mrs. Quack Quack. How Mr. Srnitter made you write a composition ... "'Quack, quack,' said Mrs. Quack Quack." (Act 1, Scene 3)
Anne gets annoyed and throws Peter’s clothes. She explains that the composition that she wrote for this punishment was so good that the teacher read it to the class. She is proud of this detail, turning Peter's insult back at him.
Peter’s mother encourages the fight, pleased that Anne is talking back to Peter. However, Anne has trouble being mature around Peter.
ANNE. With all the boys in the world ... Why I had to get locked up with one like you! ... (Act 1, Scene 3)
Anne and Peter move closer to boyfriend-girlfriend territory the longer they are locked up. The tension between them from the beginning turns into affection. Because they are the same age and locked in closed quarters, it is natural that they would become close. Anne and Peter never get to fully develop their relationship because the family is captured by the Nazis before they get a chance.
Peter obviously knows how to get to Anne. He realizes that she is self-conscious about her reputation, especially since she feels picked on by the adults in hiding with her. By bringing up this incident, Peter both connects the real world with the one in hiding and shows that he has paid attention to Anne.