as you already know, to get the inverse of any expression we start off by doing a quick switcheroo on the variables and then solving for "y", let's do so.
how to test algebraically? well, for any (a,b) pair in f(x), its inverse will have another pair but (b,a), hmmm let's plug hmmm say
f(10) = 40, and f⁻¹(40) = 10.
we could plug more values in each, same pair will come up.
as far as testing them graphically, Check the picture below.