Epoxide Ring Opening
Epoxides are very special ethers because their highly strained three-membered ring makes them very reactive.
The ring opening of an unsymmetrical epoxide shows a different 'regiochemistry' depending on the reaction medium...
However, the attacked carbon ALWAYS INVERTS its configuration.
Mechanism of the direct opening (SN2-like)
In basic medium, the nucleophile - methoxide in this case - directly attacks the least hindered position.
The mechanism is very close to SN2 (SN2-like) and is therefore very sensitive to steric hindrance in the pentacoordinate TS.
Mechanism of the acid-catalyzed opening (SN1-like)
Epoxides have a slight basic character.
In acidic medium, a good portion of the epoxide molecules are protonated.
As a consequence, the protonated molecules see their electrophilicity increased and the C-O bonds weaken.
If the epoxide is unsymmetrical, the C-O cleavage leading to the most substituted carbocation-like structure is the most favored one.
The latter mechanism resembles SN1 (SN1-like). Yet, please notice a big difference: the attack of the nucleophile happens almost simultaneously with the C-O bond cleavage. IMPORTANT: In this reaction the carbocation never completely forms. Therefore, despite the fact that the acidic opening of epoxides is regarded as a SN1-like mechanism, the inversion - NOT racemization - of the attacked carbon takes place.