In the Galois case, at least, the inertia degrees $f$ and ramifications indices $e$ of each prime $P_i$ lying over $p$ are the same. If $p$ is unramified then $e = 1$ and so the only question is what is $f$ and what is $g$? The common degree $f$ is the order of any (and each) of the Frobenius elements $(P_i | K/\mathbb Q)$ which map to the generator of the local Galois group $G(k(P_i)/\mathbb F_p)$. I always recommend Milne's online notes <a href="http://www.jmilne.org/math/CourseNotes/">http://www.jmilne.org/math/CourseNotes</a>, both the algebraic number theory and class field theory, for this kind of question. I also remember well reading this material in the Janusz book "Algebraic Number Fields". In the latter, I believe Chapter 1 and Chapter 3 are most relevant, but I do not have a copy with me.