Here a person's "heart" refers to their loyality. If a person's loyalty is "with someone," it means that they are loyal to that person. Alternate translation: "Will you be loyal to me, as I will be loyal to you? ... 'I will.'" (See: [[rc://en/ta/man/jit/figs-metonymy]] and [[rc://en/ta/man/jit/figs-idiom]])
"If so, put your hand in mine" or "If so, let us shake hands" In many cultures, when two people shake hands, it confirms their agreement. (See: [[rc://en/ta/man/jit/translate-symaction]])