There are two ways of looking at this story. Many commentators say that Jesus refuses her only to encourage her faith. This reads something into Jesus words that is possible, but it is not in the text.
Does Jesus change his mind in dealing with her. Does he first say “No” and really mean it. If this is so, what changes his mind? The dialogue between the Jesus and the woman is so intense. She accepts the traditional insult to a foreigner and turns it humbly into a compliment to her as a petitioner.
Jesus changed his mind at Cana when his mother tells him about the wine. We know from the Gospel that Jesus is always in contact with his Father. While Jesus knew it was not his hour, His Father told him otherwise. So likewise when challenged again by another woman here, Jesus is told by the Father that the hour has come for his ministry to begin to go out to the whole world.
This woman is a wonderful example of prayer. What do we do when Jesus says “No”. We keep praying and praying and praying.
“Woman, you have great faith. Your faith has made you whole.” Her daughter was well again.