Order the steps to find the inverse. Like what is step 1 then 2 then 3 then 4

In order to find the inverse of a function, the first step is "replace f(x) with y".
Then, the second step is "swap x and y".
The third step is "solve for y".
And finally, the fourth step is "change y to f^-1(x)".
For example, let's find the inverse function of f(x) = 2x:
[tex]\begin{gathered} f(x)=2x \\ y=2x \\ x=2y \\ y=\frac{x}{2} \\ f^{-1}(x)=\frac{x}{2} \end{gathered}[/tex]