I need to verify the identities of two functions and find the inverse of a one-to-one function

we have that
[tex]f(x)=\frac{1}{x-2}[/tex]Find out the inverse
Let
y=f(x)
[tex]y=\frac{1}{x-2}[/tex]Exchange the variables (x for y and y for x)
[tex]x=\frac{1}{y-2}[/tex]isolate the variable y
[tex]\begin{gathered} y-2=\frac{1}{x} \\ y=\frac{1}{x}+2 \\ f^{-1}(x)=\frac{1}{x}+2 \\ \end{gathered}[/tex]Part 2
Verify the identity function
[tex](\text{fof}^{(-1)})=\frac{1}{(\frac{1}{x}+2)-2}[/tex]simplify
[tex](\text{fof}^{(-1)})=\frac{1}{\frac{1}{x}}=x[/tex]and
[tex](f^{(-1)}of)=\frac{1}{\frac{1}{x-2}}+2[/tex]simplify
[tex]\begin{gathered} (f^{(-1)}of)=x-2+2 \\ (f^{(-1)}of)=x \end{gathered}[/tex]therefore
[tex](f^{(-1)}of)=(fof^{(-1)})[/tex]