2^((n-2)/2) + 2^((n-2)/2) = 2*2^((n/2)-1)=2^n/2

It has been a while since ive done algebra, but I cant figure out why this is all equal. Can someone help me out here?

I assume its related to rules of exponents but when I look online its mostly simpler stuff that I cant see relating to this (such as x*x=x^2 etc)