GOD answers all prayers
Right Prayer to the Almighty alone will be accepted
God is all-hearing all-aware of his creation. If everything was supposed to be fullfilled according to our prayers than we would run the universe. Then the problem would occur when we forget to pray about something. That is why we should know that Almighty is in charge of everything, he is the all power.
When we pray we are interfereing with the will of God. Then it does not respect God if he has no choice but accept the prayer. It is he who decides what to do. With that in mind one should know that his prayer will be fullfilled if he trust in God.Of course prayer should be to almight alone without any partner. Without intercessor. If you ask to a stone or a dead person on the cross do not expect much.
A prayer can be answered in different forms
1- If the person is not sure that God can hear, God will ignore that prayer
2- If he is sure, than prayer can be rejected due to sinful content.
a- If the person is good and the prayer is not right(such as asking to sin), God will not accept
b- if the person is bad and if God will punish him, then bad prayer can be accpeted with bad consequences.
3- If the person is sure about his faith and he is good, asking something good:
a- Prayer may be realized late - becasue praying is act of worship and God will love this person with consistent prayer
b- God may give the answer but the person will realize the interpretation later
c- God may decide to give something greater than the prayer that nullify the need for the prayer. For example a person in an island left alone asks for a feast, then he finds out that his boat was useable and he could survive. He did not need to stay in the island and worry about the food.
d- If the person does not receive anything in this world for his prayer and does not get angry to God and still keep his faith, then bigger answer will be in hereafter.
Last item reminds me one other option, or it includes some of the others : Delays or not visible results can be a test for the person.