Prior to verses 22-23 a father was asking for help/healing for his son who had a mute spirit tormenting him.
Mark 9:21-23 So Jesus asked the boy’s father, “How long has this been happening to him?” And he said, “From childhood. And often he has thrown him both into the fire and into the water to destroy him. But if You can do anything, have compassion on us and help us.” Jesus said to him, “If you can believe, all things are possible to him who believes.
From my study bible the Spirit Filled Life Bible:
Mark 9:22 The inability of the disciples had weakened the father’s faith.
Mark 9:23 “if you can”: The question can be understood, “Is that what you said?” Jesus’ exclamation picks up the doubting words of the father. The question deciding the issue is not Jesus’ power, but the man’s faith. The Lord’s statement concerning faith does not grant us the liberty to presume upon God’s goodness by irresponsibly asking for selfish things. Our desires must be in accord with God’s will. See 1 John 5:14,15.
Mark 9:22-23 CULTIVATING A CLIMATE OF FAITH FOR HEALING; DIVINE HEALING
In this passage Jesus tells us that “believing” is the condition for answered prayer for a healing. The father of the demon-possessed boy answered in tears, “I believe,” then added, “Help my unbelief!” Since faith is a gift, we may pray for it as this father did. Note how quickly God’s grace answered; but there is another lesson. Where an atmosphere of unbelief makes it difficult to believe, we should seek a different setting. Even Jesus’ ability to work miracles was reduced where unbelief prevailed (Matt. 13:58).
Prayer and praise provide an atmosphere of faith in God. In this text Jesus explained yet another obstacle to faith’s victory – why their prayers had been fruitless: “This kind can come out by nothing but prayer and fasting” (Mark 9:29). His explanation teaches: 1) some (not all) affliction is demonically imposed; and 2) some kinds of demonic bondage do not respond to exorcism, but only to fervent prayer. Continuance in prayer, accompanied by praise and sometimes fasting, provides a climate for faith that brings deliverance. (Mark 5:24-34/Luke 5:16-26) Nathaniel M. Van Cleave