in3x^4 do I put x to the fourth power first or the 3*x sum to the fourth?
Just as you have it written: 3x^4. There is no need for 3*x, because 3x is understood to mean X.