James here explains that wisdom is obtained through prayer. Therefore, a distinction must be made between mere knowledge, derived through study, and wisdom, which can be expressed as the proper application of that knowledge. The world is full of men and women who have knowledge, and yet lack the perspective and ability to use it properly.
Wisdom is also gained through experience and maturity, but here we are given the promise that a petition to God will be effective in garnering this gift directly from Him.
But, we must act in faith. When we petition God, we are placing our trust in His willingness and ability to grant our petitions. Doubting casts aspersion upon either His integrity or sovereignty. Neither is acceptable to God.
God answers prayer. But, he only answers the prayer that is offered effectively, and by the righteous (cf. James 5:16). Otherwise, “let not that man suppose he will receive anything from the Lord.”
Do you want wisdom? Ask God, without doubting, and you will receive the bounty you desire.