Why is $f(x)^{-1}$ used to denote the inverse of a function, and not its reciprocal?
The notation $f^n$ was adopted in set theory to denote iterated functions: functions composed with themselves numerous times. $f^n(x) = f\circ f^{n-1}(x) = f(f^{n-1}(x))$
It is from this we get the definition of the inverse of a function; being that function which when composed with the function $f$ produces the identity function. That is: $f\circ f^{-1}(x) = f^0(x) = x$
Meanwhile the notation $f^n$ was adopted independently in trigonometric theory to denote exponentiated functions: when function are multiplied with themselves numerous times. Here we obtain the more familiar use, $f^n(x) = f\cdot f^{n-1}(x) = f(x)\cdot f^{n-1}(x)$
While this meaning of the notation is more commonly encountered, both uses remain in practice, depending entirely on context to identify the meaning. Although sometimes mathematicians do adopt the notation $f^{\circ n}$ to clarify when they mean iteration rather than exponentiation.
Confusingly even when exponentiation is otherwise used it has become standard practice for the $f^{-1}$ notation to always mean the iterated inverse of functions.
It's a historic anomaly.
As others have pointed out, the notation for the inverse function is $f^{-1}(x)$. $f(x)^{-1}$ probably would denote the reciprocal of $f(x)$.
The operation $\circ$ of composition of functions is in some ways analogous to multiplication.
Let $\mathrm{id}$ be the identity mapping, $\mathrm{id}(x) = x$. You have for example $f \circ f^{-1} = \mathrm{id}$, which corresponds to $xx^{-1} = 1$ for numbers.
See, Inverse of $a$ i.e. $a^{-1}$ (where $a$ is any element of some group) means that $a*a^{-1}=e$ where $e$ is the identity w.r.t. binary operation $*$. I guess you don't understand Group theory and all i.e. abstract algebra. But only thing to notice here is that in Functions binary operation is not multiplication but composition denoted by $\circ$ and identity is not 1, rather this 1 denotes identity function i.e. $e$ s.t. $e(x)=x$ for all $x$. So inverse of $f$ here means $f^{-1}$ s.t. $f\circ f^{-1}=e$. So if $f(x)=x^2$ and what will you compose $x^2$ with to get $e$? Replace $f(x)^{-1}=\pm\sqrt{x}$ insted of $x$ in $f(x)=x^2$, you will see, $f\circ f^{-1}(x)$=($\pm\sqrt{x})^2=x$ i.e. $f\circ f^{-1}=e$ i.e. identity function.
Just make sure you understand composition of functions, that is the binary operation here, not multiplication. $2^{-1}=1/2$ because operation is Multiplication in $\mathbb{R}$. To your wonder $2^{-1}=-2$ in $\mathbb{Z}$ as operation there is addition and identity is $0$ and it can also be $2$ itself if we consider $2$ as an element of another group say {$1,2$} and put operation as multiplication modulo 3 (means remainder of $2\times 2$ when divided by $3$, isn't it $1$? so isn't $2^{-1}=2$? but don't worry about that now.
I hope I didn't confused you. Just worry about composition of function for now, and understand that