The "that of" is optional. It is implied to be there even when it is absent. This is called ellipsis, where one or more words that are required by the theoretical formal grammar are not said, yet it is still correct.
(The "three dot" symbol … is called ellipsis because it denotes where words are omitted, though not through grammatical ellipsis. It is used in quotations where part of the quotation is missing (usually because it is not relevant to the purpose for which the quotation is being used).)
Comparisons are an area where you get a lot of ellipsis. Depending on context, you might even just be able to say here "the explanation of the second sentence is the same", because the reader will know that you mean "as that of the first sentence". Even in that case, that is serving as a stand-in for "the explanation", so if you wanted you could be really unnecessarily verbose and say "as the explanation of the first sentence".
Just by the by, however, there is another error in the examples you give. You need a definite article before "first sentence" and "second sentence", as shown in the preceding paragraph. "Same" also requires the definite article.
As to "the explanation of the second sentence is the same as the first sentence's", I'm not sure if that's wrong per se - the genitive has the same semantics at least as "of". However, it seems messy and would not look good in a formal context.