Both acids have carboxylic acid functional group so when the carboxyl proton gets removed, the negative charge on the oxygen anion can only delocalize to the adjacent O bonded to the same C (in these two molecules). The kind of electron withdrawing group matters. NO2 is more electron withdrawing than phenyl by induction, because N and O are more electronegative than C. This will weaken the O-H bond in NO2CH2CO2H further, making its carboxyl proton more easy to remove.