The sentence that contains an error in grammar is:
B. Because Tomás wanted to ride his bike, when he met his classmates downtown.
This sentence is a fragment because it begins with "Because" and is improperly connected to the second part. It should be revised to form a complete thought, such as: "Tomás wanted to ride his bike when he met his classmates downtown."