Here is a proof. Recall the Commutative Gelfand Naimark Theorem, it states that a commutative unital $C^*$ algebra $\mathfrak{A}$ is isometrically isomorphic under the Gelfand Transfrom $\Phi$ to $C(\hat{\mathfrak{A}})$, where $\hat{\mathfrak{A}}$ is the multiplicative functionals on $\mathfrak{A}$. (I first consider the Gelfand transform as acting on multiplicative functionals, then identify it's domain with the spectrum)
we set $\mathfrak{A}$ to be $B$ as you defined, consider a multiplicative functional $h$ on it. since B is a $C^*$ algebra, we have that $h(a^*) = \overline{h(a)}$ (this is a known fact, one might say "every $C^*$ algebra is symmetric"). Now convince yourself that by continuity of $h$, $h$ is completely determined (on $B$) by $h(a)$. This gives us a bijective map $\psi: \hat{B} \to \sigma(a)$ (Since the image of $\Phi(a)$ is the spectrum of $a$), given by $h \mapsto h(a) = \Phi(a)(h)$. This is continuous in the weak * topology. And since both spaces are compact, it's a homeomorphism. This identifies the spectrum with what the Gelfand Transform acts on. Your original consideration of the Gelfand transform of $x$ under my definition is actually $\Phi(x) \circ \psi^{-1}$.
Great, look at $f \circ \psi \in C(\hat{B})$. Since $a$ is normal we can use the Commutative Gelfand Naimark Theorem and conclude that there exists $x \in B$ such that $\Phi(x) = f \circ \psi$. So:
$$\forall s \in \sigma(a) \; \Phi(x)(\psi^{-1}(s))=f(s) = f(\Phi(a)(\psi^{-1}(s)))$$
This is since the Gelfand transform of $a$: $\Phi(a)(\psi^{-1}(s)) = s$ is the identity function. The above equalities is exactly what you wanted.