FOIL is only applicable when multiplying 2 binomials.
Given #(x-1)(x+4)(x-3)#
FOIL could be used to multiply any 2 of the given terms, but some other method would be required to multiply the third one (since multiplying the first 2 terms would result in something that is not a binomial)
As a demonstration, we could FOIL #(x-1)(x+4)# (and later multiply the product by #(x-3)# some other way).
#{:
("First terms", x xx x, " = ", x^2),
("Outside terms",x xx (-3), " = ", (-3x)),
("Inside terms", (-1) xx x, " = ", (-1x)),
("Last terms", (-1) xx (-3)," = ", 3),
("- - - - - - - - - - -","- - - - - - - - - - - -","- -","- - -"),
(" ", " ", " ", x^2-4x+3)
:}#
Now we are left with multiplying #x^2-4x+3# by #(x-3)#
As a further demonstration, lets use a tabular method for this multiplication:
#[ (xx, " | ", x^2, -4x, +3 ),
("- -", " - ", "- - - -", "- - - -", "- - - -" ),
(x, " | ", x^3, -4x^2, +3x ),
(-3, " | ", -3x^2, 12x, -9 ),
("= =", " = ", "= = = =", "= = = =","= = = ="),
(" ", x^3, -7x^2, +15x, -9 )
]#