I know how to take the reflection of a graph in the

line, or more formally, finding the inverse function. All I really do is switch the x and y variables in the function.
e.g.

,
I tried taking the same idea and extending it to a reflection in the y=mx line, m constant. But I encountered problems as such:
Take the function

, reflect it in the line

or
I tried using the same idea as before, so I substitute all x and y variables as such and this is the result:
But when I graph both functions, it doesn't look correct. The new 'reflected' function looks much too fat/shallow.
Could someone please explain what I'm doing wrong. Where is my logic flawed here?