I will not contradict the observation of a fellow educational consultant as we have a policy against that at this forum. What I can do is offer you a response based upon how my students learn to approach this type of discussion from me. Setting aside previous advice, I will offer a review of this presentation. I must warn you though that I normally do not advise students who are already handled by other teachers and consultants as a sign of professionaI respect and to avoid confusing the student's writing style as already taught by his educator. Consider our interaction a one time deal since you are already handled by someone else.
I believe that the discussion basis of the essay is:
In many countries, prison is the most common solution to the problem of crime.
This is foundation of the discussion. The writer is then asked to consider another side of the discussion based on a different opinion:
... another effective way is to provide people with better education so that they cannot become criminals.
It is this topic that the discussion requirement refers to as an alternative to the foundational belief/ opinion. This is the sole discussion target of:
TO WHAT EXTENT DO YOU AGREE OR DISAGREE?
The writer is given a discussion basis (imprisonment for crimes) and an alternative consideration (education to prevent crime). The imprisonment discussion is not up for debate. That is a given fact. It is the effectivity of education as a crime prevention tool that is in question. This is the point you must either strongly support or not support, using 2 paragraphs of proper defense reasons for your opinion. You need to directly tell the reader the strength of your opinion on education in relation to crime prevention ( I strongly / partially agree / disagree) based on the strength of your reason ( it has limited... ). There is no reference to " discuss both views" so a comparison presentation would be out of place as it will not allow you to clearly respond to the discussion question, which is based on a single opinion of support or non-support for the "However" statement.
You were judged illogical and lacking in explanations and examples because you opted to take a short cut by using your 2 opposing reasons in one paragraph rather than separating the reasoning justifications by spreading it out (one topic each) over 2 paragraphs. 2 related but seperate discussion presentations will create coherent and cohesive (related) paragraph discussions. The analysis you presented in the 3rd paragraph was never a part of the discussion requirements and need not be included in the discussion paragraphs.
The provided essay really had potential. It just wasn't properly discussed using the appropriate format.
Again, this is only my analysis and opinion of your work. I certainly do not mean to add to your confusion. I can only hope that my explanation helps you understand the writing task. As a reminder, this is how I teach my students to write with a focus on clarity. I do not mean to change your writing style as you have been previously taught.