Humility, perseverance, faith, tenacity, love will get God to answer your prayer. The foreign woman practically begged Jews to help her. If she was proud, the story would've been different.
Despite Jesus rebuff, the woman kept asking. Maybe God wants us to keep asking until our heart are changed and our desires are purified? Also until something happens.
P. U.S. H. Pray until something Happens
The woman was unflinching in her belief that Jesus could help her. She had faith. She wouldn't and couldn't persevere in her mission without faith. Jesus was not announcing His whereabouts so this woman had to ask around, look for him all over. She had to be tenacious.
Lastly, love. The woman's love for her daughter was the underlying basis for all of this- and probably what moved God's heart the most. Love heals. Love responds. Love works miracles.