”Tial” strictly refers back to a reason and is fairly uncommon, I’d say.
”Do” is a particle and is used in more contexts. According to PIV, it can express insisting when commanding something: ”Iru do!” and according to Revo surprise in a question ”Kie do li estas?”, Some people use ”do” like a filler word, like ”so” in English, when they don’t know what to ...
There is a difference in meaning between the two words:
do indicates a logical consequence;
tial indicates a reason.
In your particular sentences this difference in meaning has essentially the same result: the reason why you are asking the question is most likely a logical consequence of the prior statement:
Mia demando estas do ĉu ĝi validas aŭ ne
Tiel means ‘in that manner’. Do means something more like ‘therefore’. Either can be translated ‘thus’, but the senses are not the same.
(Oh dear, maybe I have just now understood why some people insist on thusly: to avoid the do-sense.)