The sentence that is punctuated correctly is: "Some people like riding the bus, but others prefer the train."
Here's why:
1. The use of a semicolon in the first sentence is incorrect because a semicolon is typically used to connect two independent clauses that are closely related. In this case, "Some people like riding the bus" and "but others prefer the train" are separate ideas that should be connected with a comma and a coordinating conjunction like "but."
2. The second sentence uses a semicolon before "as a result," which is incorrect. A semicolon should be used to separate two independent clauses. In this case, "It rained for days" is an independent clause, but "as a result" is not a complete sentence on its own. Therefore, a semicolon is not appropriate here.
3. The third sentence correctly uses a semicolon to connect two closely related independent clauses: "The book is difficult" and "its dense text continues for hundreds of pages."
4. The last sentence uses a semicolon incorrectly because "her mother" is not an independent clause. To correct this, a comma should be used instead of a semicolon.
In summary, the sentence "Some people like riding the bus, but others prefer the train" is punctuated correctly as it appropriately uses a comma and a coordinating conjunction to connect two separate but related ideas.