No, they are not because there are different things being "sampled".

(a) What is the sample space of tossing three coins?

Since each coin can come up "H"(heads) or "T"(tails) three coins can come up

{"HHH", "HHT", "HTH", "HTT", "THH", "THT", "TTH", "TTT"}.

That is the sample space.

(b) A coin is tossed 3 times in a succession, and the total number of times heads comes up is noted. What is the sample space?

Here the outcome of each trial is a number so the thing being "sampled" is a

**number**. Since in flipping a coin there times, there may be "0", "1", "2", or "3" heads, the sample space is {0, 1, 2, 3}.