FOIL stands for: First (times First), Outside (times Outside), Inside (times Inside), Last (times Last).
In the problem to expand (9x+7)(6x+4), First-times-First is 9x * 6x = 54x^2, Outside-times-Outside is 9x * 4 = 36x, Inside-times-Inside is 7 * 6x=42x, and Last-times-Last is 7 * 4=28.
Combining these gives (9x+7)(6x+4)=54x^2+36x+42x+28. The 36x and 42x are "like terms" and combine to give 36x+42x=78x. Therefore, the answer is:
(9x+7)(6x+4)=54x^2+78x+28
The reason this works is the distributive property: a*(b+c)=a*b+a*c, and the commutative property: a*b=b*a
(a+b)*(c+d)=(a+b)*c+(a+b)*d
=a*c+b*c+a*d+b*d
=a*c+a*d+b*c+b*d (which is what you'd get by using "FOIL" on the original product)