Hello!
Let’s begin with the second sentence:
“To change your life,” said William James, start immediately and do it flamboyantly.”
This sentence is not correct because it does not contain an opening quotation mark before the word “start.” Therefore, we can eliminate the second sentence. Now for the third sentence:
Ms. Winters said, Do all of the math problems on page 98 for homework tonight.
This sentence is not correct. The sentence above contains a direct quotation but does not have opening or closing quotation marks. Therefore, we can eliminate the third sentence as well. Now for the fourth sentence:
“I hope I don’t have to go, Ron said, but if I do, I’ll try to have fun.”
This sentence is not correct. The sentence above does not contain a closing quotation mark after the word “go” nor an opening quotation mark before the word “but.” Therefore, we can eliminate the fourth sentence as well. That leaves only the first sentence:
”If you get a hamster, you’ll be responsible for its care,” my mother said.
This sentence makes proper use of both commas and quotation marks. That being said, we can now conclude that the first sentence is the only one to use correct punctuation.
I hope this helps!