Find the inverse of the function

f(x) = 3^x+2

y-2=3^x

take the log base 3 of each side.
log3(y-2)=x
x= log3(y-2)
y= log3(x-2) is the inverse.

check: f(inverse)= 3^(log3(x-2)) + 2
= (x-2)+ 2
= x