The most obvious similarity between Anne and Peter is their age. They're both at an age where young people at that time period began to explore their own sexuality and become interested in the opposite sex. Anne is thirteen when she starts writing in her diary, and Peter is sixteen. However, I think this is where the similarity between the two teenagers ends.
Anne is outgoing, talkative, and sensitive. She always remains optimistic about her family's situation throughout their ordeal. Peter is quiet and rarely expresses his personal thoughts and feelings. Anne sees herself as accomplishing something great in life, while Peter says he wants to be a gambler or just loaf around. Anne spends some of her time studying, while Peter sees his studies as a boring requirement. Anne is reflective about her strengths and weaknesses while being self-confident about what kind of woman she wants to become. Peter obviously has not given that much thought to his future.
I doubt that Anne and Peter would have even been friends if they had known each other under normal circumstances because they are so different. Anne realizes Peter is not someone she would like to know romantically, but she does want to maintain a friendship with him. He's really the only person in hiding with whom she can express her feelings.