replace f(x) with y:
y = 3x +2
interchange the variables:
x = 3y +2
switch the equation so the Y is on the left side:
3y +2 = x
subtract 2 from each side:
3y = x-2
divide each term by 3 to get y alone:
y = (x-2)/3
replace y with inverse of F(x) which is f^-1(x):
f^-1(x) = -(x-2)/3