i am a little unsure as to how [G:N] = r is relevant to your question, other than saying N is of finite index. i also don't know what you mean by "one subgroup is in the center of the other" in terms of your subsequent question.

if H is in Z(N), of course nh = hn, but then it cannot be the case that H∩N = {e}, unless Z(N) is likewise trivial.

but if H,N are both normal in G, with H∩N = {e}, then for any h in H, and n in N, we have:

since , because N is normal, while

, since because H is normal.

since H∩N = {e}, we see that h and n commute.