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?
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.