People have been wrestling with the relationship between God's Sovereignty (which includes answering prayer) and man's "free will" for ages. The Bible clearly teaches both. In Protestantism, error can (and does) result when one is emphasized at the expense of the other (Eg. Hyper-Calvinism on one hand and Open-Theism on the other).
We must remember, that first our freedom is not unlimited. For instance, I didn't choose my parents, or where I was born or raised. I'm a 5'8" white boy with a less than average vertical leap, so regardless of my free choice, I'll probably never be able to slam dunk a basketball. On the other hand, I've been blessed to be born to the parents that I have in the nation that I have. This has clearly given me opportunities that others do not, and yet I had no choice in these areas. Although I have been given the gift of volition (free will) I don't have unlimited ways in which to use my will. However, in a given SITUATION I still have the choice in how to respond (except perhaps if I was held at gun point--even then I can choose to an extent what to do).
Now God sits outside and above time and has perfect omniscience knowing all things actual and possible including the "free" choices of man. Because of this, it is no problem for God to arrange His creation providentially to achieve a certain outcome while taking into account free will. This includes the answers to prayer. So in your examples, the individuals were exercising their free wills in the situations they encountered (perhaps answering a prompt from God) and yet it was God who arranged those free decisions to come about to accomplish His purpose.
This of course touches on the whole question of foreknowledge and predestination, both of which are Biblical concepts. But enough rambling for now...