I would like an example of maps between a smooth curve $C$ and a singular curve $B $, $f:C \rightarrow B$, where the genus $p\_a(C)=p\_a(B)$ and greater than or equal to 2.



Example of maps between a smooth curve and a singular curve
I am just writing my comment as an answer. Let $k$ be a field. Let $C$ be a smooth, projective, connected $k$-curve. Let $B$ be a projective, reduced, $k$-curve, and let $$f:C\to B$$ be a finite $k$-morphism. By the universal property of normalization, $f$ factors uniquely through the normalization, $$\nu:\widetilde{B}\to B,$$ i.e., there is a unique $k$-morphism $$q:C\to \widetilde{B}$$ such that $\nu\circ q$ equals $f$. If the field $k$ is perfect, then $\widetilde{B}$ is a smooth, projective $k$-curve.


For every integer $g\geq 2$, for a very general smooth, projective, connected $k$-curve $C$ of genus $g$, the only nonconstant $k$-morphisms $q$ from $C$ to smooth, projective, connected $k$-curves $\widetilde{B}$ are finite morphisms to $\mathbb{P}^1\_k$. Thus, if the field $k$ is perfect and uncountable (or simply has infinite transcendence degree over the prime subfield), then for a very general smooth, projective, connected $k$-curve $C$ of genus $g$, every dominant morphism $f$ from $C$ to a projective $k$-curve $B$ is the composition of a finite morphism $$q:C\to \mathbb{P}^1\_k$$ and the normalization of a curve of geometric genus $0$, $$\nu:\mathbb{P}^1\_k \to B.$$ 


There are many such morphisms: for every integer $d\geq \lfloor (g+2)/2 \rfloor$, there exists a finite morphism $q$ of degree $d$ (in fact, the parameter space of such linear systems on $C$ has dimension $\rho = 2d-g-2$). There are also many curves $B$ of arithmetic genus $g$ whose normalization is $\mathbb{P}^1$; among Deligne-Mumford stable curves, the largest irreducible stratum in $\overline{M}\_g$ of such curves has dimension $2g-3$. Thus, for a very general curve $C$, the parameter space of such morphisms with domain $C$ and having degree $d \geq \lfloor (g+2)/2 \rfloor$ has dimension $2d+g-2$. (We can parameterize such a morphism via the Hilbert point of the associated closed subscheme $C\times\_B C$ of the product surface $C\times C$.) 


