The general process is as follows:
i) Rename "f(x)" as "y".
ii) Solve for "x=".
iii) Swap the x and y variables.
iv) Rename the new "y" as "f-inverse".
Depending on the book or instructor, steps (ii) and (iii) may be reversed.
Another way of thinking about it:
f(x) says "first multiply x by 5 then subtract 3"
The inverse does the opposite operations in the opposite order.
The opposite of "multiply by 5" is "divide by 5" and the opposite of "subtract 3" is "add 3".
Doing those in the opposite order is "first add 3 to x, then divide by 5":
(This kind of analysis is too difficult for complicated functions. For more complicated functions, use the method that pberardi and stapel give.)