Answer:
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.
to prove that they are inverses of each other, you need to check all points in the functions, and there is an infinity of them, so instead, you can write f(x) like this:
y = 3x - 5
solve for x:
y + 5 = 3x
x = (y + 5) / 3
swap x and y:
y = (x + 5) / 3
this is the same as g(x) which, therefore the functions are inverse of each other.