Let f(x) = y and we have
y = 2 + ex+4 the idea is to get x by itself and then "switch" x and y
Subtract 2 from both sides
y - 2 = ex + 4 take the natural log of both sides
ln [y - 2] = ln e x + 4 and by a log property we can write
ln [y -2] = (x + 4) ln e ln e = 1 so we can now ignore this
ln [y - 2] = x + 4 subtract 4 from both sides
ln [y - 2] - 4 = x "switch" x and y
ln [x - 2] - 4 = y and, for y, write f-1(x) where f-1(x) indicates the inverse function
ln [ x - 2 ] - 4 = f--1(x)
Here's the graph of the original function and its inverse : https://www.desmos.com/calculator/wr4hgezjxu