Neither of these statements is true.
While explicit examples are not too hard to come up with, it's worth understanding exactly why this is false. In particular, there's something called a pair of groups, which is a pair $(G,H)$ where $G$ is a group and $H$ is a normal subgroup thereof. Two pairs $(G_1,H_1)$ and $(G_2,H_2)$ are isomorphic if there is a isomorphism $f:G_1\rightarrow G_2$ which has $f(H_1)=H_2$ - that is, $f$ restricts to an isomorphism on $H$ as well as $G$. Isomorphic pairs have the property $G_1/H_1\cong G_2/H_2$. These pairs capture both what $G$ and $H$ are, but also capture how $H$ sits within $G$.
One can come up with two non-isomorphic pairs $(G_1,H_1)$ and $(G_2,H_2)$ such that $G_1\cong G_2$ and $H_1\cong H_2$, but $G_1/H_1\not\cong G_2/H_2$ - for instance $(\mathbb Z,\mathbb Z)$ and $(\mathbb Z,2\mathbb Z)$. One can spin this into a counterexample for your problem: in your notation, let $G=\mathbb Z$ and let $K$ be the subgroup of even elements. Let $H=K$. Note that $G/K=\mathbb Z_2$ and $H/K$ is trivial.
More generally, there's something called a free product with amalgamation by which we can take any two pairs $(G_1,H_1)$ and $(G_2,H_2)$ with $H_1\cong H_2$ and find a bigger group $G$ of which $G_1$ and $G_2$ both embed as subgroups and for which there is a common such group $H\subseteq G_1\cap G_2$ such that $(G_1,H)$ and $(G_2,H)$ are isomorphic to the desired pairs. This basically lets you ignore any structure you had hoped to get by requiring a common subgroup - as long as $H_1\cong H_2$, we can make the pairs do whatever they want.
Basically, if you can come up with a counterexample using pairs $(G_1,H_1)$ and $(G_2,H_2)$ where $G_1\cong G_2$ and $H_1\cong H_2$ (which you can to both statements, one by the example I give above and the other by the linked question), then you get counterexamples to your existing statement by squishing the pairs together in a suitable way - this is why group theorists are unlikely to talk about two groups intersecting if there is no larger common structure between them.