The correct answer is A. at.
“At” is used to indicate proficiency in a skill or subject. For example, “He is good at math” or “She is an expert at cooking.”
“In” is used to indicate a location or position. For example, “He is in the kitchen” or “She is in the United States.”
“From” is used to indicate a source or origin. For example, “He is from California” or “She is from a wealthy family.”
“With” is used to indicate possession or association. For example, “He is with his friends” or “She is with the company.”
In the sentence “He is weak at grammar,” the word “at” indicates that the person is not very good at grammar. This is because “at” is used to indicate proficiency in a skill or subject.