A is the right answer to this question. There are a lot of people who become confused with prepositions especially when they are not aware of how prepositions should be used. This sentence has a blank in between goes and school. This means that the preposition will be used should allude to school. With the given prepositions, which is the best one available?
By is not correct because it does not say that he is passing by the school. C is not correct either because it would mean that he rides a school which is not what the sentence is supposed to mean. Based on the meaning of the sentence, A is the best answer.