Why are the answers for these two different?
Wrong: It rained all day, and thus, the hut collapsed.
Correct: It rained all day, and thus the hut collapsed.
"And" with conjunctive adverbs: Add a comma before the coordinating conjunction but avoid inserting a comma after the conjunctive adverb.
Wrong: I hate fish, however, I like chips.
Correct: I hate fish; however, I like chips.
Use a semicolon—not a comma—before a conjunctive adverb or transitional phrase (therefore, however, thus) that links two independent clauses.
It rained all day, and, thus, the hut collapsed
andIt rained all day, and thus the hut collapsed
andIt rained all day and, thus, the hut collapsed
andIt rained all day and thus the hut collapsed
are all correct (whilst that first sentence is indeed wrong).