What you are doing is correct. I'll briefly repeat your construction. Suppose $A$ is a von Neumann algebra with underlying Hilbert space $H$, it is standard that $A$ admits a unit, call the unit $p$. Note that $p$ is necessarily an orthogonal projection in $B(H)$.
For any $a\in B(H)$ define $a_p := pap$, which we understand as a map $p(H)\to p(H)$. This gives a linear map $B(H)\to B(p(H))$ and if you restrict this map to $A$ it becomes an injective $C^*$-morphism (since $p$ is the unit of $A$). It follows that the map is a $C^*$-isomorphism from $A$ to the image of $A$, call this image $A_p$.
Note that $A_p$ is a von Neumann algebra with underlying Hilbert space $p(H)$, I think the easiest method would be to check that it is a SOT closed subspace of $B(p(H))$. Further $p_p=\mathrm{id}_{p(H)}$, so $A_p$ contains the identity of the Hilbert space onto which it is represented.
Now if you would like to check some property of $A$ that does not explicitly reference the representation on $H$ (ie it is a property of $C^*$-algebras that are isomorphic to a von Neumann algebra rather than concrete von Neumann algebras) you can work with $A_p$ instead of $A$. For example if you can show that a von Neumann algebra containing the identity is generated by projections then this holds for $A_p$, but $A_p$ is isomorphic to $A$ and the property "is generated by projections" will be carried over by the isomorphism.
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
Best Answer
The elements of $S$ are either states, or negatives of states. So a convex combination $\psi$ of elements in $S$ looks like $$ \psi=\sum_{j=1}^nt_j\phi_j+\sum_{j=n+1}^m t_j (-\phi_j), $$ where $\phi_j$ is a state and $t_j\geq0$ for all $j$, and $\sum_jt_j=1$. Recall that a convex combination of states is a state. Let $$ \lambda=\sum_{j=1}^nt_j,\quad \mu=\sum_{j=n+1}^m t_j, $$ and $$ \omega_1=\tfrac1\lambda\,\sum_{j=1}^nt_j\phi_j,\qquad \omega_2=\tfrac1\mu\,\sum_{j=n+1}^mt_j\phi_j. $$ Then $\omega_1$ and $\omega_2$ are states, $\lambda+\mu=1$, and $$ \psi=\lambda\omega_1-\mu\omega_2, $$