$\displaystyle f(x)=x^2-1$

I know the first step is to change it to $\displaystyle y=x^2-1$ and then you would switch the x and y variables but when switching the x and y, do you just switch the variables in this case or when switching the variables do you include the $\displaystyle ^2$ of the x?

so would it be $\displaystyle x^2=y-1$

or

$\displaystyle x=y^2-1$

sorry, this is posted in the wrong section.