How do I always know what X to the second power over X is? Also, does it matter if the negatives are on the top or the bottom.

x^2 = x*x

divide that by x and one of the x's in the numerator cancels out.

This illustrates the rule that

x^n/x^m = x^(n-m)

you subtract exponents because the factors cancel each other out.