Which of the following is the inverse of y=3^x?

For this case, we must find the inverse of the following function:
[tex]y = 3 ^ x[/tex]
We follow the steps below:
We exchange the variables:
[tex]x = 3 ^ y[/tex]
We put the variable y on the left side of the equation:
[tex]3 ^ y = x[/tex]
We apply logarithm properties:
[tex]y = log_ {3} (x)[/tex]
So:
[tex]f ^ {- 1} = log_ {3} (x)[/tex]
Answer:
[tex]f ^ {- 1} = log_ {3} (x)[/tex]
Option B