The correct sentence is:
b. The teacher as well as the students was late.
In this construction, "the teacher" is the main subject, and since it is singular, the verb should also be singular ("was"). The phrase "as well as the students" is a modifying phrase and does not change the subject.