The Third Way starts by defining two types of possible entities: contingent and necessary.
X is temporally contingent in W if and only if X can possibly not-exist in W.
Y is temporally necessary in W if and only if Y cannot possibly not-exist in W.
The argument begins like this:
1. Something has always existed. (Premise)
If there were ever a time in the past in which nothing at all existed, then nothing would exist even now, for out of nothing comes nothing. Therefore, something has always existed.
2. There is a possible state of affairs S in the past in which nothing temporally contingent exists. (Premise)
3. It is necessarily the case that S is explicable. (Premise)
Where "explicable" means possibly caused. Assuming a brick could just pop into existence uncaused out of nothing doesn't undermine premise (3). For, it is still possible for the brick to be caused into existence.
4. Either there is a temporally necessary being, or else there is no temporally necessary being. (Law of excluded middle)
5. S is explained either by nothing or by a temporally necessary being. (From 3 and 4)
6. Nothing can explain nothing. (Premise)
7. Hence, S is explained by a temporally necessary being. (From 5 and 6)
8. Therefore, a temporally necessary being exists. (From 7)
Notice how the Modal Third Way doesn't rely upon the S5 axiom of modal logic. The logical axioms used throughout the MTW are fairly benign, e.g. the K system of modal logic.
We could then add the omnipotence argument to close the gap between temporally necessary being and God.