FOIL and PEMDAS are both ways to solve mathematical equations.
FOIL
First
Outside
Inside
Last
PEMDAS
Parenthesis
Exponents
Multiplication &
Division
Addition &
Subtraction
FOIL is usually used to solve equations in two sets of parenthesis, for example:
(23+x)(5-4x)
PEMDAS is used to solve multiple-operation equations, such as:
5 x 4 + 6 - 2 x 7
Whew, hope this helped :D