Caption: Mercury's orbit exhibits a 3:2 spin-orbit resonance which is illustrated in the diagram.
Features:
Say you land on Mercury on the equator just at noon on top of a giant mountain.
Now 3/2 rotation periods later, one Mercurian year has passed.
But since it is 3/2 rotation periods, it is now midnight for you.
It takes another 3/2 rotation periods to bring you back to noon.
Thus noon to noon is 3 rotation periods or 2 revolution periods (i.e., 2 Mercurian years).
In the case of Mercury's orbit, the oscillations are axial rotations and revolutions (AKA orbital rotations).
From the specialized formulae for the synodic period (see file synodic_period.html), we have, in fact, Mercurian day equal to 2 orbital periods = 175.9382 days (as aforesaid). The diagram also shows why this must be so (as aforesaid).
The accurate Mercurian day = 175.942 days (NASA: Mercury fact sheet, 2021). The discrepancy between our value and NASA's may be due to the specialized formulae being based on assumption of uniform circular motions in a common plane which does NOT hold for Mercury. But there might be other reasons for the slight discrepancy: e.g., astronomical perturbations and/or observational error.