It seems to me that the intersection is zero in general, i.e. the answer is YES.

Let us prove that $f^{-1}(B)$ is a smooth curve in $X$. This clearly implies the desired result. The proof of smoothness of $f^{-1}(B)$ relies one the following definition and a lemma.

**Definition.** Let $C$ be a complex curve in a complex surface $S$ and $x\in C$. Let us call the local fundamental group of $S\setminus C$ at $x$ to be $\pi_1(U_x\setminus (C\cap U_x))$ where $U_x$ is a sufficiently small neighborhood of $x$.

I think that the following lemma is correct.

**Lemma**. *A complex analytic curve $C$ in $X$ is smooth at $x\in C$ iff the local fundamental group of $C$ at $x$ is $\mathbb Z$.*

If this lemma holds, then it is easy to see indeed that in your question the total perimage of $B$ is smooth, because for any point $x\in B$ and a sufficiently small neighborhood of $U$ of $x$ the map from $f^{-1}(U\setminus (U\cap C))$ to $U\setminus (U\cap C)$ is etale. I.e. all connected components of $f^{-1}(U\setminus (U\cap C))$ have $\pi=\mathbb Z$.

**Intuition for the lemma.** I think that the lemma can be obtained as a corollary of Mumford's result stating that a point $x$ on a surface is smooth iff its link is the 3-sphere $S^3$. Here is why.

Indeed, suppose that $\pi_1(U_x\setminus (C\cap U_x))=\mathbb Z$. This means that the intersection of $C$ with the boundary of $U_x$ is an unknot. Indeed, the only knot is $S^3$ whose complement has fundamental group $\mathbb Z$ is the unknot.

Now, let us take a double cover of $U_x\setminus (C\cap U_x)$ and take its analytic completion. This is just a double cover of $U_x$ and its boundary is again $S^3$. So this double cover is smooth. Finally we see that $U_x$ is a smooth quotient of a ball by a smooth involution, hence its branching set (i.e., $C$) is a smooth curve.