When our intellect understands something, it extends to infinity. A sign of this is that when any finite quantity is given, our intellect can think a greater one. But this order of our intellect to an infinite would be in vain were there not some infinite intelligible. And so it is necessary that some infinite intelligible exists, which must be the greatest of things. And this we call God.
Nicolas Malebranche (Search after Truth, Elucidation Ten, LO 614):
The mind clearly sees that the number which when multiplied by itself produces 5, or any of the numbers between 4 and 9, 9 and 16, 16 and 25, and so on, is a magnitude, a proportion, a fraction whose terms have more numbers than could stretch from one of the earth's poles to the other. The mind sees clearly that this proportion is such that only God could comprehend it, and that it cannot be expressed exactly, because to do so, a fraction both of whose terms were infinite would be required. I could relate man such examples demonstrating not only that the mind of man is limited but also that the Reason he consults is infinite. For, in short, the mind clearly sees the infinite in this Sovereign Reason, although he does not comprehend it. In a word, the Reason man consults must be infinite because it cannot be exhausted, and because it always has an answer for whatever is asked of it....No creature is infinite; infinite reason, therefore, is not a creature.
Even though both of these arguments begin with our ability to think about the mathematical infinite and conclude to the existence of God, they are radically different kinds of argument. Malebranche's argument is, we might say, an argument that thinks in terms of formal causality: the mathematical infinites we can reason about are thought to be mathematical infinites in God Himself. When a geometer works up a proof in geometry, Malebranche thinks he is studying God -- in particular, he is studying the archetype of space as it is found in God, or, to put it in other terms, he is studying the limits that divine Reason places on God's power to create space. The mathematician literally and directly studies God, albeit in a very limited way; mathematical reason is divine Reason.
St. Thomas's argument, on the other hand, is purely in terms of final causality. The mathematical infinite with which the mathematician is concerned is not the divine infinite in any way, shape, or form, and the reason he consults is not the divine Reason. But the infinite is still an issue requiring explanation: mathematical reason would be, as we might say, massive overkill if there were no actual infinite intelligible to which the human mind is somehow suited. And thus the intellect's ability to think of the infinites in mathematics is a sign of the fact that it is disposed to know God.
A major difference between the two is that St. Thomas the Aristotelian has no problem with the idea that created substances may be in some real way infinite. And, indeed, the Aristotelian account of the human intellect requires that human beings be infinite in a certain respect. Actually, we can probably be much stronger: on Aquinas's view, everything is infinite in some sense. Some of these ways of being infinite are not particularly interesting for the purposes discussed here, but the relative infinity of the human intellect means that there is no fundamental problem with mathematical infinites being drawn from sense experience and being contemplated in our own minds. But Malebranche does not allow for this possibility; indeed, he thinks it manifestly absurd. On his view we are obviously and completely finite creatures with completely finite intellects having access only to completely finite sensible experience; and thus there is no way we could even recognize mathematical infinites as infinite unless our minds already had access to something that actually was infinite. Every attempt to explain how we have an idea of the infinite either collapses, so that we are forced to regard mathematical discussions of the infinite as utterly unintelligible, or relies on a pre-existing infinite idea, either openly or by smuggling it in through the back door. You can't get the idea of the infinite from sensible things, you can't get it from yourself, and thus you must be consulting some actual infinite accessible to the mind.
So they are actually very different arguments, despite some similarities. In a sense one might say that they are as far apart as Aristotle and Plato.