Interesting question. "Problem" can collocate with both "with" or "of." Examples:
1. The problem with Sally is she talks too much. The problem with the car is that is has a flat tire. He's having a problem with his best friend. He's having a problem with math.
Use "problem with" when (i) you are talking about a person or thing that suffers from some defect or problem, like Sally who talks to much or the car with a flat tire, or (ii) you are talking about a person having a difficulty in a relationship or in accomplishing something, like a problem with a friend or with math.
2. The problem of overpopulation led to China's 1-child policy. The problem of global warming cannot be easily solved.
Use "of" when you are talking about a bad thing causes problems for you or other people.
I hope this helps.