The method commonly taught (and commonly used) for finding the inverse of a function is as shown by the other tutor: switch the x and y and solve for the new y.
Here is an alternative to that method which is much faster and easier and works for many relatively simple functions.
The inverse of a function "gets you back where you started". To do that, the inverse must perform the opposite operations in the opposite order.
The given function performs the following operations on the input:
(1) multiply by 2;
(2) subtract 1;
(3) divide by 7
So the inverse function needs to
(1 multiply by 7;
(2) add 1;
(3) divide by 2
The inverse function is f^-1(x) = (7x+1)/2, or (7/2)x+1/2.