Takesaki lemma 4.5 Consider the following fragment from Takesaki's book "Theory of operator algebra I" (p82 and previous pages):

The notation $\mathscr{L}_G$ means all normal operators with spectrum contained in $G$ and similarly $\mathscr{L}_{\mathbb{C}}$ denotes the normal operators.
Why is the boxed equality true? The right hand side is the functional calculus on two elements.
I suppose it makes intuitive sense. It reminds me of the fact that composition respects classical functional calculus but I can't justify it in this case. In any case, I also think it is relevant that $u(a), v(a) \ne 1$. Can anybody formally justify why the boxed equality is true and resolve this technicality?
 A: Let $u: \mathbb{C} \setminus \{-i\} \to \mathbb{C} \setminus \{1\}$ denote the fractional linear transformation
$$
u(z) = \frac{z-i}{z+i}, \qquad z \neq -i.
$$
It can be verified that $u$ maps the real axis to bijectively to the unit circle with $1$ excluded, the upper half plane bijectively to the interior of the unit disc, and the lower half plane with $-i$ excluded bijectively to the exterior of the unit disc.  (It follows that for any self-adjoint operator $s$, the operator $u(s)$ is unitary and does not have $1$ in its spectrum.  With some work, this could be verified directly from a definition of $u(s)$ as $(s-i \mathbf{1})(s+i \mathbf{1})^{-1}$ if one does not want to appeal to general facts about the functional calculus.)
A short computation shows that $u^{-1}: \mathbb{C} \setminus \{1\}$ to $\mathbb{C} \setminus \{-i\}$ is given by
$$
u^{-1}(z) = \frac{z+1}{i(z-1)}, \qquad z \neq 1.
$$
Note also that $\frac{w+1}{w-1} = i u^{-1}(w)$ for all $w \neq 1$.
Turning to your problem, the operators denoted by Takesaki as "$u(a)$" and "$v(a)$" respectively are literally $u(h)$ and $u(k)$ in the sense of the above definition of the function $u$ and the continuous functional calculus.  Because $u^{-1}$ is given by the formula above, it follows that $(u(h)+\mathbf{1})(i(u(h)-\mathbf{1}))^{-1} = h$ and $(u(k)+\mathbf{1})(u(k)-\mathbf{1})^{-1} = ik$, again where all of this is interpreted in the sense of the continuous functional calculus.
It follows that the operator denoted by Takesaki by $g$ applied to the pair "$u(a), v(a)$", which is literally $g$ applied to the pair $u(h), u(k)$, is (from the definition of $g$) the function $f$ applied to $u^{-1}(u(h)) + i u^{-1}(u(k)) = h + ik = a$, in other words, $f(a)$.
Side note, the operator $u(s)$ is sometimes called the Cayley transform of the self adjoint operator $s$; von Neumann used the Cayley transform and knowledge of the spectral resolution of unitary operators to deduce the spectral resolutions of self adjoint operators.  See, e.g., https://en.wikipedia.org/wiki/Cayley_transform
A: There are a lot of technicalities lurking around here. In this answer, I try to give a systematic approach.

First, note that $(1,1) \notin\sigma((u(a), v(a)))$. To see this, note that $$\sigma(u(a),v(a))\subseteq \sigma(u(a))\times \sigma(v(a))$$
and $1 \notin \sigma(u(a))$ and $1 \notin \sigma(v(a))$ because for instance
$$1-u(a)= 2i(i+h)^{-1}$$
is invertible.

If $a_1, \dots, a_n$ are normal commuting elements in a unital $C^*$-algebra and if $f_i \in C(\sigma_i(a_i))$ and
$$f(z_1, \dots, z_n) = \sum_{i=1}^n f_i(z_i)$$
as functions on $\sigma(a_1)\times \dots \times \sigma(a_n)\supseteq \sigma(a_1, \dots, a_n)$, then
$$f(a_1, \dots, a_n) = \sum_{i=1} f_i(a_i)$$
where the left hand side is the multivariable functional calculus and the right hand side is the sum of the usual one-variable functional calculi.
To prove this, approximate each $f_i$ by a sequence of polynomials in norm and use this to construct a sequence that approximates $f$. Since the statement is clear for polynomials, we are done.

Next, we observe that if $h: \sigma(u(a),v(a)) \to \mathbb{C}$ denotes the continuous function
$$h(z,w) = \frac{z+1}{i(z-1)}+ \frac{w+1}{w-1}$$
then $h(u(a),v(a)) = (u(a)+1)(i(u(a)-1))^{-1}+ (v(a)+1)(v(a)-i)^{-1}$ where the right hand side is defined using the sum of ordinary functional calculi and the left hand side is defined using the multivariable functional calculus.
To see this, use the previous paragraph.

(Spectral mapping theorem) Note that multivariable functional calculus respects composition: that is if $a_1, \dots, a_n$ are commuting normal elements in a unital $C^*$-algebra $A$, and if $f \in C(\sigma(a_1, \dots, a_n))$ and $g \in C(\sigma(f(a_1, \dots, a_n)))$, then $$f(\sigma(a_1, \dots, a_n)) = \sigma(f(a_1, \dots, a_n))$$
and
$$g(f(a_1, \dots, a_n)) = (g\circ f)(a_1, \dots, a_n).$$
Here $f(a_1, \dots, a_n)$ and $(g\circ f)(a_1, \dots, a_n)$ are defined using the multivariable functional calculus and $g(f(a_1, \dots, a_n))$ is the usual one-variable functional calculus.
To prove this, mimique the proof of the one-variable spectral mapping theorem, see e.g. Murphy's book theorem 2.1.14.

Since $g= f \circ h$ as functions on $\sigma(u(a),v(a))$ and since $(1,1) \notin \sigma(u(a),v(a))$, we obtain using the multivariable spectral mapping theorem
$$g(u(a),v(a)) = (f\circ h)(u(a),v(a)) = f(h(u(a),v(a)) = f((u(a)+1)(i(u(a)-1))^{-1}+ (v(a)+1)(v(a)-i)^{-1}).$$

A calculation (involving the fact that ordinary functional calculus respects composition) shows that $$(u(a)+1)(i(u(a)-1))^{-1}+ (v(a)+1)(v(a)-1)^{-1} = a$$

We can conclude $$f(a) = g(u(a),v(a))$$
as desired.
