Your problem seems to be not understanding what "indices" (I would say "exponents" which is a little more specific than "indices") mean. ('x squared') means 'x times x', means 'x times x times x', etc. Further, a negative exponent means "reciprocal" or "1 over" the value. In particular so that .
Of course, so that and
So the first equation says and comparing the two sides x= -4.
The second equation says and comparing the two sides gives -x= 1.
(There is a technical point here- that the exponential function is "one-to-one" which means that if f(x)= f(y) then x= y. Not all functions have that property but the exponential does. All you need to know is that you can do that for exponential functions.)
Definition of exponentiation: b^m = b * b * b * … * b (b times itself m times)
For example: b^4 × b^3 =
( b × b × b × b) × ( b × b × b) = (definition of exponentiation)
b × b × b × b × b × b × b = (associative property of multiplication)
b^7 (definition of exponentiation)