For any point (x, y), that appears in one function, the point (y, x) must appear in the other function.
For any point (x, y), that DOESN'T appear in one function, the point (y, x) must NOT appear in the other function.
So if you find any point that DOESN'T meet the above rules, you can prove that the functions are NOT inverses of each other.
But if you want to prove that they ARE inverses of each other, you have to check ALL points in the functions, and there are infinity of them, so that's not practical. Instead, you can write f(x) like this:
y = 3x - 5
Now solve for x:
y + 5 = 3x
x = (y + 5) / 3
Now swap x and y:
y = (x + 5) / 3
This is the same as g(x). Therefore the functions are inverses of each other. oh