To #FOIL#, is to multiply two or more factors together, to form one whole function.
#FOIL# is an acronym for the following terms which indicates how to multiply two binomials.
#F# - First
#O# - Outer
#I# - Inner
#L# - Last
So, for example, let's say we have two factors such as:
#(color(red)(x)-color(blue)(1))(color(green)(x)+color(purple)(2))#
From here, we follow the steps provided and get this;
#(color(red)x*color(green)x)+(color(red)x*color(purple)(2))+(color(blue)(-1)*color(green)(x))+(color(blue)(x*color(purple)2))#
#f(x)=x^2+2x-1x-2#
All we do here is combine like terms, and we have our function:
#f(x)=x^2+x-2#
Hope this helps!