A function is simply a process that takes in a number, does a few operations on it (for example, add, multiply etc), and then gives out another number. If you want to figure out the inverse of a function, all you really want is to know what the reverse of that process is.
The easiest way to find out the inverse function is to swap the input and output variable.
In our example:
let g(x) = y
y = 4/(3-x), now we will reverse the variables
x = 4/(3-y), now we will proceed with the manipulations to isolate y
(3-y)x = 4
3x - xy = 4
xy = 3x -4
y = 3 - 4/x, this is the inverse function of g(x)