Mother warned the children not to go near the scorpion.
In indirect discourse, you don't need to cover every word in the direct quotation. You can use a verb like warned to imply the tone of what was said. If the preceding context hasn't said that "it" is a scorpion, here are some graceful ways to introduce that fact in indirect discourse:
Mother told the children that it was a scorpion and warned them not to go near it.
Mother pointed out that it was a scorpion and warned the children not to go near it.
Mother warned the children that it was a scorpion and told them not to go near it.
or even:
Mother exclaimed that it was a scorpion and told the children not to go near it.
Oh, but this is from an exam question. This means that you must guess what the exam's author is trying to test you on. Here's my guess (which might be wrong): the author wants you to carry it over from the original quotation and into the indirect discourse:
Mother said, "Oh! It's a scorpion. Don't go near it, children."
Mother exclaimed with disgust that it was a scorpion and told the children not to go near it.
The other alternative has that in place of it.
Saying that is still grammatically correct, but it's more emphatic. It's like pointing to the scorpion with your finger as you're speaking (or suggesting that Mother was doing that as she was speaking).
It's not a rule in English to change "yesterday" to "the previous day" in indirect discourse. That happens a lot, but only because the sentence with indirect discourse is usually said on a day other than the sentence that it describes. (You could ask a separate question about that.) You would change it to that only if, in the indirect statement, you wanted to clarify or change the emphasis of the original. There's no rule or custom suggesting that you should ordinarily do it.
Regarding your question about two consecutive thats, it does sound a little bit clumsy in English, but it's used quite often. It's used most often in speech, where rhythm makes it easier for a listener to follow: the stress goes on the second that and the syllable is usually lengthened a bit. It's formal enough for writing, though. Here's a typical example:
His last words were “Moby-Dick.” The friend who was with him at the time said that that was the movie that was playing on the TV in his hospital room, but I wonder if he was planning another ballet.
Source: "Wild Thing: Rudolf Nureyev, onstage and off", by Joan Acocella, The New Yorker, Oct. 8, 2007.
The first that introduces the subordinate clause. The second that refers to "Moby-Dick".
People used to put a comma after a that that introduced a subordinate clause, like the comma in your second option, but this went out of practice about a hundred years ago. You can still find it in books written in the 19th century, but on an exam, a choice with a comma in such a place will likely be marked wrong—unless the exam's author based the questions on hundred-year-old grammar books, which does sometimes happen.