First of all, since $H,K$ are normal, $H\cap K=1$ and $G=HK$, the group $G$ is in fact a direct product $G=H \times K$.
Now, to prove the first direction suppose that for all $A \leq G$, $A=(A\cap H)(A\cap K)$, and assume for contradiction that $(|H|,|K|)\neq 1$. Denote $|H|=n$, $|K|=m$. That is, $\exists p \in \mathbb Z$ (a prime) such that $p | n$ and $p | m$. Therefore, $\exists x \in K$ and $\exists y \in K$ such that $x^p=y^p=1$. The subgroup $A$ generated by $(x,y)$ is a cyclic subgroup of order $p$ that cannot be written (non trivially) as $(A\cap H)(A \cap K)$.
For the second direction let $A\leq G$ be an arbitrary subgroup. Clearly $(A\cap H)(A \cap K) \subseteq A$, so it's sufficient to show that every $a\in A$ can be written as $(x,y)$ for $x\in A \cap H, y\in A \cap K$.
Since $(n,m)=1$, $\exists \alpha , \beta \in \mathbb Z$ such that $\alpha n + \beta m =1$. Every $a\in A$ has a unique presentation as $(x,y)$ for $x\in H, y\in K$. Now, note that $$a^{\alpha n}=(x^{\alpha n}, y^{\alpha n})=(1,y^{1-\beta m})=(1,y).$$ Applying the same idea to $a^{\beta m}$, we get the desired presentation: $a=(a^{\beta m}, a^{\alpha n})$.