A grammar school will allow two A-level students, who had their places withdrawn after failing to get top grades, to return.