To answer this problem, you must be familiar with the nucleophilic acyl substitution mechanism.
In this mechanism, the nucleophile (methanol) becomes the -OCH3 group in the ester.
At least 80% of second semester organic chemistry is two mechnanisms: nucleophilic acyl addition and nucleophilic acyl substitution. It's worth your time to become familiar with these mechanisms. See problems 705 (basic conditions), 706 (acidic conditions), 707, and 708.