I am soo confused!

My calculus teacher told me that you cant muliply, add, subtract.. etc. one number that is squared to a number that is not

for example you cant multiply 3x^2 (4x)

I remember her saying something about a FOIL method but I missed that part of the school year. I was in a different school that didnt teach this method.

Can I do that or not?

and can I add, multiply, etc a number with an x to a number without one?

For example, would (4x)(-1+x) be 4x??