i need some help with this one I'm working with inverse functions I'm needing step by step in how to do it

Given:
A function is
[tex]f(x)=3x[/tex]Required:
Find the inverse of the function.
Explanation:
The given function is
[tex]f(x)=3x[/tex]substitute f(x) =y
[tex]y=3x[/tex]Interchange x and y.
[tex]x=3y[/tex]Find the value of y as:
[tex]y=\frac{x}{3}[/tex]substitute
[tex]y=f^{-1}(x)[/tex][tex]f^{-1}(x)=\frac{x}{3}[/tex]Final answer:
The inverse of the given function is
[tex]f^{-1}(x)=\frac{x}{3}[/tex]