A student prays for success but then abandons studying. Prayer remains important, but neglecting the needed effort does not follow from this report. مَنْ لَمْ يَسْأَلِ اللَّهَ warns against losing the habit of turning to Allah; it does not erase the need for lawful means.
Example 1: Pray for knowledge while studying regularly and asking useful questions.
Example 2: Pray for recovery while also seeking necessary medical care.
The outcome of supplication need not follow the exact timetable or form a person imagines. The learner's responsibility is to ask sincerely, maintain hope, and act conscientiously.