This is essentially the argument in Daniel Marcus's Number Fields (which I very highly recommend, especially for its exercises), Theorem 28 on page 100.
Let $G=\mathrm{Gal}(L/K)$ be the Galois group. The decomposition group of $Q$ is
$$D = \{ \sigma\in G\mid \sigma Q = Q\}$$
and the inertia group of $Q$ is
$$E = \{\sigma\in G\mid \sigma(a)\equiv a\pmod{Q}\text{ for all $a\in \mathcal{O}_L$}\}.$$
Then $Z_Q$ is defined to be the fixed field of $D$, and $T_Q$ is the fixed field of $E$.
As usual, let $[L:K]=n = efr$, where $e$ is the ramification degree and $f$ is the inertia degree.
First, I claim that $[Z_Q:K]=r$. Indeed, by the Fundamental theorem of Galois Theory, $[Z_Q:K] = [G:D]$. If $\tau\in G$, then every element of the coset $\tau D$ maps $Q$ to $\tau Q$; moreover, if $\tau Q=\rho Q$, then $\rho^{-1}\tau \in T$. So we have a one-to-one correspondence between the cosets of $D$ in $G$, and the primes over $P$ of the form $\tau Q$ with $\tau\in G$. Since $L$ is Galois over $K$, the action of $G$ is transitive on the primes lying above $P$, and there are $r$ of them. So the index $[G:D]$ equals $r$, hence $[Z_Q:K]=r$, as claimed.
Next, we show that $e(Q'|Q)=f(Q'|Q)=1$. Notice that $Q$ is the only prime of $\mathcal{O}_L$ that lies over $Q'$: because $\mathrm{Gal}(L/Z_Q)=D$ by the Fundamental Theorem of Galois Theory, and $D$ acts transitively on the primes of $\mathcal{O}_L$ lying over $Q'$; but every element of $D$ maps $Q$ to itself, so $Q$ is the only prime lying over $Q'$. Since $[L:Z_Q]=e(Q|Q')f(Q|Q')r(Q|Q') = e(Q|Q')f(Q|Q')$, and since $erf=[L:K]=[L:Z_Q][Z_Q:K]=[L:Z_Q]r$, then $[L:Z_Q]=ef$. And since $e(Q|Q')\leq e$ and $f(Q|Q')\leq f$, it follows that we must have $e(Q|Q')=e$, $f(Q|Q')=f$. And since $e=e(Q|P) = e(Q|Q')e(Q'|P)$, and $f=f(Q|P) = f(Q|Q')f(Q'|P)$, then $e(Q'|P)=f(Q'|P)=1$.
In particular, since $1 = e(Q'|P) = e(Q'|Q'')e(Q''|P)$, then $e(Q'|Q'')=1$. Thus, $e(Q|Q'') = e(Q|Q')e(Q'|Q'') = e = e(Q|P)$, which proves the first equality.
Finally, we show that $f(Q|Q'') = 1$, or equivalently that $\mathcal{O}_{T_Q}/Q''$ is equal to $\mathcal{O}_L/Q$. For this it suffices to show the corresponding Galois group is trivial. If we can establish this, then we will have
$f = f(Q|Q') = f(Q|Q'')f(Q''|Q') = f(Q''|Q')$, which will give the second equality you want.
To show that $\mathcal{O}_L/Q$ is the trivial extension of $\mathcal{O}_{T_Q}/Q''$, it is enough to show that for every $\overline{a}\in\mathcal{O}_L/Q$, the polynomial $(x-\overline{a})^m$ lies in $\mathcal{O}_{T_Q}/Q''[x]$ for some positive $m$. If this is the case, then every element of the Galois group must send $\overline{a}$ to itself. Pick any preimage $a\in \mathcal{O}_L$ of $\overline{a}$. Then the polynomial
$$\prod_{\sigma\in E}(x - \sigma(a))$$
has coefficients in the fixed field of $E$, that is, in $T_Q$; reduce modulo $Q''$ to get a polynomial with coefficients in $\mathcal{O}_{T_Q}/Q''$; since $\sigma(a)\equiv a \pmod{Q}$ for all $\sigma\in E$, the reduced polynomial is of the form $(x-\overline{a})^m$, with $m=|E|$. This proves that every element of $\mathcal{O}_L/Q$ is fixed by every element of the Galois group, so the extension is trivial, hence the inertia degree is $1$. This proves the second equality, as outlined above.