There's a really easy trick to finding these. Expanding expressions of the form (x+y)^n can be done as follows:
First write x^n. The coefficient of the next term is equal to the current coefficient multiplied by the current exponent of x, and divided by the term number. For the coefficient of the second term, this is 1 * n / 1 = n. Decrease the exponent of x by 1, and increase the exponent of y by 1. Repeat this process until you get to y^n.
If they are of the form (x-y)^n, the signs just alternate. If you're unsure, use the property that a - b = a + (-b).
"Foil" is just a way of remembering that you must multiply each term in one factor by each term in the other.
Using "foil" on (x+3)(x+3) give x2+ 3x+ 3x+ 9= x2+ 6x+ 9. Now to multiply that by x+3 again, first multiply each part by x: x(x2+ 6x+ 9)= x3+ 6x2+ 9x, then multiply each part by 3: 3(x2+ 6x+ 9)= 3x2+ 18x+ 27, and finally add: x3+ 6x2+ 9x+ 3x2+ 18x+ 27= x3+ 9x2+ 27x+ 27.
This is not "abstract algebra"- I'm moving it to "General Math".