Spinoza believed that G-d is the only substance which exists and thus, is not separate from nature. His argument then states that if there were to be other substances besides g-d then that would mean that it would have to share or have some attributes in common with G-d. Who has all the attributes. Spinoza argues (proposition 5) that if two substances share an attribute that would mean we would not be able to distinguish them from each other. Thus, two substances cannot share the same attribute. This means that the other attribute is part of G-d. Anything that can exist does exist as part of G-d and G-d is infinite.
Breaking it down, if there cannot be two substances with the same attributes, and if a substance with certain attributes cannot create another substance with different attributes, and because we know that substance exists, then there must be only one substance that exists only in itself and is not caused. This is because everything must only exist in itself or be caused by something else (such as we see in Axiom 1), and this substance must be the cause of all other essences. Thus, all essences of things are in the first substance which is G-d. And what we think of as individual things are not independent, only G-d is independent. It is its own cause and everything else is caused by something else. If the substance/G-d cannot be created by something that is external, but we know that things exist, then this original substance must then exist. Therefore, the substance must be infinite, and g-d is thus infinite because nothing else can create it. (Prop. 7 and 8).