Nice soliliquoy, but the questions posed were ignored.
Is God capable of doing the wrong thing such that prayer can redirect his course?
If God can change his mind, was he wrong the first time?
"Is God capable of doing the wrong thing such that prayer can redirect his course? " Prayer can change His course. For example had Ninevah not repented they would have indeed been destroyed like Sodom and Gemorrah was. But that is not to say that God is capable of doing the wrong thing. He is not. There is no sin and no evil in Him. But that doesn't mean that there is only one right option available to Him. There may be many options. In the story of Ninevah the prophet Jonah didn't won't to go to Ninevah, because Ninevah was renown for it's wickedness and Jonah felt that Ninevah didn't deserve God's mercy. Would God have been right to destroy Ninevah without sending Jonah? I can't say Ninevah didn't deserve what was coming, so how could it be wrong? That God loved them so much that He sent Jonah, doesn't mean that was the only course available to Him. He didn't owe them mercy.
"If God can change his mind, was he wrong the first time? "
Again, I think the illustrations just provided, say no. There is not one and only one right course that God can choose. And scripture does record God changing His mind as the result of prayer.