This is a very controversial subject in schools today. While some (like John) would like to see prayer in school, others (like Mary) do not. For John, he most likely feels that he should be free to pray (given by not being able to takes away his rights of religion). Mary, on the other hand, may feel as if prayer in school is one-sided (given it is typically Christian) and it forces her to have certain beliefs (which she may not have).
In order to satisfy both, prayer need not be deemed mandatory. Instead, John may wish to have prayer meetings with those who wish to be involved. The meeting can be held somewhere where those who may be against prayer do not have to witness the meeting.
In essence, the compromise being made needs to insure that no person's rights are being infringed upon. By holding the meetings out of the eyes of those who may be offended, the prayer can take place and those who may be offended do not have to witness the prayer.
Essentially, there is no perfect solution. People will always have issues with behaviors which they feel intrude upon their own individual beliefs. A compromise between the two is the only way that both will be satisfied. This way, each is able to "get what they want" without feelings as if they have to bear witness to behaviors they do not agree with.