cannot connect two bones together
In edit mode select the head only of bone 1, then press Shift S "Cursor to selected", then select the tail only of bone 2 and presse shift S "selection to cursor". Then select the bone 1, shift select the bone 2, and press Ctrl P "Connected". Different bone groups are not a problem because they are referred to pose mode, not edit mode.