If I want to simplify the following expression such that x= -1:

-9x^{2}- x + 1

___________

x^{3}+ x

How do I input the value of -1 into -9x^{2}?

like this -9(-1)^{2 }which simplifies to -9(1) which equals -9

or like this -9(-1^{2}) which simplifies to -9(-1) which equals positive 9

I ask this because I know that exponents only apply to the value or parenthetical expression right next to it. In the former case, (-1) times (-1) is positive 1. In the latter case, the square only applies to the 1 and not to the minus sign which is then left over after the 1 is squared. So, this yields a -1.

So, which way is right??