If they had a child together, probably one of them is female - so should it be "her" ex-boyfriend?
(It's possible they were a same-sex couple with a surrogate mother, but I think his/her confusion is more likely the issue here.)
We need the context to be sure. In general, the teacher means "You and I aren't talking as mature adults should talk to each other because you are trying to have fun with me, or make fun of me, or trying to get me to feel or do something for your benefit."
Interested in Language