Let’s first posit some premises:
1. Change presupposes potentiality.
2. Potency is an accident.
3. Potency is necessarily for (some) actual existence. That is, it is for some act, some perfection, either substantial or accidental, belonging to the subject that has the potency.
4. Substantial change is the coming into existence of one thing from another. Depending on its direction, the change is called either generation (kawn) or corruption (fasad).
Now, onto the argument:
Take any given determinate kind, call it A. If, in (4) substantial change, A becomes B, then, by (1), A had the potentiality for B. This potency, given (2), inheres in some subject, this being either:
(a) A itself,
(c) the agent C, which actualizes the potency, or
(d) something else, x.
Not (a); otherwise, A would have the potency for its own nonexistence. This contradicts (3). Not (b); for B does not yet exist; as such, it cannot ground the potency for itself. Not (c); for A is the terminus a quo of the change, not C. That is, A is what changes, not C. Therefore, (d); now, this something else, x, is itself either:
(d.1) some determinate kind x’, or
(d.2) something indeterminate.
Not (d.1); otherwise, the problem in (a) would recur, and (3) would consequently be contradicted again. Therefore, (d.2) is left over. And because A is what undergoes the change, this indeterminate something has to be some element of A. Qua such, call it prime matter. Therefore, etc.