The question is how it can be proved the statement in the title:
Let $f: X\to Y$ be a finite morphism of nonsingular curves.
Then the pullback morphism $f^*:\operatorname{Div} Y \to \operatorname{Div} X$ preserves linear equivalence.
I have found this very same topic answered here:
In my opinion the answer linked above (and consequently the proof) is correct as long as one assumes that at least the curve $Y$ is irreducibile. So my doubt is: is it so obvious that we are dealing with irreducibile curves at the point that the book doesn't even specify it? In such case why? Or am I wrong about the fact that the proof assumes the irreducibility of ? In such case I am not able to justify this part of the proof:
"[...] On the other hand, for each $Q_i$ we can find an open set of on which $g=u\cdot g_i^{v_{Q_i(g)}}$ [...] "
since I cannot understand why it must exist an open neighborhood in which both $g$ and $g_i$ are regular.
I hope my doubt is clear, thanks in advance.
Yes, we are dealing with irreducible curves at that point in the book. From just before remark II.4.10.1 (page 105 in my copy):