Short segments of RNA displace one strand of a DNA duplex during diverse processes including transcription and CRISPR-mediated immunity and genome editing. These strand exchange events involve the intersection of two geometrically distinct helix types-an RNA:DNA hybrid (A-form) and a DNA:DNA homoduplex (B-form). Although previous evidence suggests that these two helices can stack on each other, it is unknown what local geometric adjustments could enable A-on-B stacking. Here we report the X-ray crystal structure of an RNA-5'/DNA-3' strand exchange junction at an anisotropic resolution of 1.6 to 2.2 Å. The structure reveals that the A-to-B helical transition involves a combination of helical axis misalignment, helical axis tilting and compression of the DNA strand within the RNA:DNA helix, where nucleotides exhibit a mixture of A- and B-form geometry. These structural principles explain previous observations of conformational stability in RNA/DNA exchange junctions, enabling a nucleic acid architecture that is repeatedly populated during biological strand exchange events.