'God' isn't sure what to do and is waiting for someone to convince 'God'?
No, that's not it. When a teacher in school is teaching math, and a student is having a difficult time with it.... does the teacher just walk over and do everything for the student?
No. Does the teacher not know what to do? No, they know what to do (if they are a private school teacher at least).
When does the teacher come and help? When the students asks for help. Then the teacher comes and helps guide the student.
G-d responds to his people. It isn't that he is somehow confused about the next step. Only that he has determined to give us free-will. He's not going to come and impose himself on you. He'll help, when you are openly and honestly asking for direction.
Now as it directly relates to this specific discussion, it's even more clear that G-d isn't confused about what to do, because he specifically told his people to pray for the peace of Jerusalem.
The point is that this is G-d's will. Thus praying for this, is the same as praying that G-d's will is done on Earth. The very act of praying this, is showing our faith and loyalty to our G-d.
Pretty simple stuff really.