$$\ce{R-COOH ->[SOCl2,CH2N2][Ag2O/CH3OH] X}$$
While solving Carboxylic derivatives recently, I came across this. so following the reagents one by one-
1)SOCl₂$\ce{SOCl2}$ will form acid chloride.
2)CH₂N₂$\ce{CH2N2}$ (diazomethane) on the other hand reacts with carboxylic acid to give-METHYL ESTER a methyl ester.but but we are currently on acid chloride, this part is a little confusing to me.
3)Ag₂O$\ce{Ag2O}$ in aqueous/alcoholic medium should give (CH₃O−$\ce{CH3O-}$) ions.
overall im just lost. I need some hints.How to proceed? What is wrong with my reaction mechanism?