FOIL (First Outer Inner Last) Method.
eg. (x+3) (x+3)
First: Multiply x and x. Equals to x^2.
Outer: Multiply x and 3. Equals to 3x.
Inner: Multiply 3 and x. Equals to 3x.
Last: Multiply 3 and 3. Equals to 9.
Since 3x and 3x has the same variable(which is x), you need to solve it. 3x+3x= 6x.