Read the sentence below. Which of the following uses an infinitive in the correct way while still keeping the same meaning?

Bill ran to the store after school buying a shirt that was on sale.
(1 point)

O Bill ran to the store after school and bought a new shirt that was on sale.

O Leave as is

O Buying a shirt that was on sale is why Bill ran to the store after school.

O Bill ran to the store after school to buy a shirt that was on sale.

O Bill ran to the store after school to buy a shirt that was on sale.