How about giving us the exact problem?
BTW, the whole business of switching variable names is highly overrated, IMO. If you have a one-to-one function f, such that y = f(x), then the inverse relationship is x = f-1(y). The graphs of y = f(x) and x = f-1(y) are exactly the same.
For example, log functions in a particular base and exponential functions in the same base are related as described above. If y = log x, then x = 10y, and both these equations have the same graph. The two equations are merely two ways of saying the exact same thing. The business of switching variables so that you get two different graphs obscures what is IMO the most important concept of functions and their inverses -- providing a way to take an equation in the form y = f(x) and solve it for x in terms of y.