FactChecker said:
I wouldn't swap x and y. They are probably doing it so that the graph on the usual X-Y grid would have the X-axis horizontal and the Y-axis vertical. Swapping them changes their definitions
I agree with this sentiment completely.
If ##y = x^3 - 2 = f(x)##, then ##x = \sqrt[3]{y - 2} = f^{-1}(y)##
The graphs of the two equations ##y = x^3 - 2## and ##x = \sqrt[3]{y - 2}## are exactly identical, meaning any pair of numbers (x, y) that satisfies the first equation also satisfies the second equation.
In subsequent classes such as calculus, one sometimes needs to find the inverse in order to evaluate a definite integral. In such cases it is counterproductive and foolish to swap variables.
As
@FactChecker mentioned, swapping variables changes the definitions of the variables.
As an example, consider the conversion formulas for changing from Fahrenheit temperature to Celsius: ##f(C) = F = \frac 9 5 C + 32## and ##f^{-1}(F) = C = \frac 5 9 (F - 32)##
You can verify these formulas with pairs such as (0, 32), (20, 68), and (100, 212), where the first number in a pair is the Celsius temperature and the second is its Fahrenheit equivalent.
Swapping variables in these formulas leads to nothing but confusion.