If they are inverses when you compose f(finv) you will get x
AND if you compose finv(f) you will also get x.
IE: call y=2x+8 and yinv=8-0.5x
so y(yinv) = 2(8-0.5x)+8
=16-x+8
= 24-x
Thus, since that composition is not equal to x they are not inverses. However, if it was equal to x you still need to check yinv(y) to see if it equals x.
If they both equal x then, the functions are inverses. If even one of them fails to equal x, then they are not inverses.