Finiteness or infiniteness is irrelevant; a finite example yields an infinite one by taking a direct product with an infinite group. And every infinite example can be turned into a finite example by moding out by a normal subgroup of $G$ of finite index contained in $H\cap U$.
In general, if $G$ is a group, $H$ and $K$ are subgroups, then $[H\colon H\cap K] \leq [G:K]$ in the sense of cardinalities; but you may or may not get equality. In particular, if $[G:H]=[G:K]=p$, then $[G:H\cap K]\leq p^2$, and is a multiple of $p$, but you may or may not have equality to $p^2$.
Proposition. Let $G$ be a group, $H$ and $K$ subgroups. Then $[H:H\cap K] \leq [G:K]$ in the sense of cardinalities, with equality if and only if $HK=G$.
Proof. We define a map from the left cosets of $H\cap K$ in $H$ to the left cosets of $K$ in $G$ by mapping $h(H\cap K)$ to $hK$. I claim the map is well-defined and one-to-one: $\begin{align*} h(H\cap K) = h'(H\cap K) &\iff h'^{-1}h\in H\cap K\\ &\iff h'^{-1}h\in K\quad\text{(it is always in }H\text{)}\\ &\iff hK = h'K. \end{align*}$ The map is onto if and only if for every $g\in G$ there exists $h\in H$ such that $gK=hK$, if and only if for every $g\in G$ there exists $h\in H$, $k\in K$ such that $g=hk$, if and only if $G\subseteq HK$, if and only if $G=HK$. $\Box$
In particular, for you situation, if $HU$ is a subgroup of $G$ (it need not be!) then $HU=G$, so you will have $[G:H\cap U] = [G:H][H:H\cap U] = [G:H][G:U] = p^2$. But if $HU$ is not a subgroup, then the best you have is that $p$ divides $[G:H\cap U]$, and $p\lt [G:H\cap U] \leq p^2$; so it could be any of $2p$, $3p,\ldots,(p-1)p,p^2$.
In the example Gerry Myerson gives, for instance, the intersection has index $6=2p$ ($p=3$).