SN1 Reaction Involving Carboxylic Acids
The carbonyl oxygen is more nucleophilic. You can draw a resonance structure of the carboxylic acid that places a formal negative charge on that oxygen which rationalizes its greater nucleophilicity. Also, after it adds to the carbocation, the resulting intermediate will be resonance stabilized. If the other oxygen attacked, no resonance structures would be possible.