The argument shows the “double inequality”: when you take $x\in H\cap K$, then, for $h\in H$ and $k\in K$,
$$
hk=(hu)(u^{-1}k)
$$
This is (possibly), a different way of writing $hk$ as the product of an element in $H$ by an element in $K$.
Since $hu=hv$ only if $u=v$, we see that every element of $H\cap K$ provides a different way for writing $hk$ as a product of one element in $H$ by an element of $K$. Therefore there are at least $o(H\cap K)$ ways.
Then the author proves that the number of ways is at most $o(H\cap K)$; indeed, if $hk=h'k'$ is a rewriting, we get that $u=h^{-1}h'=k(k')^{-1}\in H\cap K$; then $hk=(hu)(u^{-1}k)$ is among the rewritings above. So we cannot have more rewritings than $o(H\cap K)$.
Maybe you can understand this better in terms of functions.
Consider the surjective map $f\colon H\times K\to HK$ defined by $f(h,k)=hk$. Define
$$
(h,k)\sim(h',k') \text{ if and only if }hk=h'k'
$$
Since $hk=h'k'$ is the same as $f(h,k)=f(h',k')$ this is an equivalence relation. We want to count the number of elements in $[(h,k)]_{\sim}$, the equivalence class of $(h,k)$.
Consider the map $g\colon H\cap K\to [(h,k)]_{\sim}$ defined by $g(u)=(hu,u^{-1}k)$, which is well defined because
- $hu\in H$,
- $u^{-1}k\in K$,
- $(hu)(u^{-1}k)=hk$
We want to prove that this map is injective and surjective.
If $g(u)=g(v)$, then $hu=hv$ and so $u=v$. Hence $g$ is injective.
Let $(h',k')\in[(h,k)]_{\sim}$. Then $hk=h'k'$, so $u=h^{-1}h'=k(k')^{-1}\in H\cap K$ and
$$
(h',k')=(hu,u^{-1}k)=g(u)
$$
so $g$ is surjective. Hence $[(h,k)]_{\sim}$ has $o(H\cap K)$ elements. Since the cardinality is the same for all equivalence classes, we get that
$$
o(H\times K)=o(HK)o(H\cap K)
$$
because there are $o(HK)$ distinct equivalence classes.