When searching for the originator of the method of removing radicals from equations I found the following remark by D. Mooney:

"In the 97th Section of his Analysis, Doctor Hales shews the method of taking quadratic surds out of an equation, provided the number of terms be not greater than four, but if there be a fifth term, whether rational or surd, he is of opinion that the equation cannot, by that method, be cleared from surds."

Were this the case, we would have no other alternative, than to recur tothe method of Monsieur Fermat, by seigning the surds equal to an assumed letter, and thence by means of as many simple equations, as there are surds, to take these letters out of the equation; but this is a work of so much labour, that it is sufficient to deter a person slightly acquainted with algebra.

and then details his method of removing an arbitrary number of square roots from an equation by repeated squaring (I assume "surds" are square roots).

The description of Fermat's method seems to indicate that he is the original source of the technique of reducing the problem of removing square roots (or even general radicals) from equations to solving a linear system of equations, where the monomials of radicals are the unknowns.

**Question:**

what kind of problem did Fermat exactly solve and how has that influenced later work of other mathematicians; apparently Moivre solved the general case?