The sentence with correct pronoun-antecedent agreement is:
Mrs. Smith was excited to teach her class.
The other sentences contain pronoun-antecedent agreement errors. For example, "The brothers were getting along so well that he decided to go on a bike ride together" incorrectly uses the singular pronoun "he" instead of a plural pronoun. Similarly, "The twins laughed so hard she cried" incorrectly uses the singular pronoun "she" instead of a plural pronoun.