Well, first of all ask yourself what it means for an acid HA to be 'more acidic'.
Thermodynamically, that means that this equilibrium:
HA + H
2O
A
- + H
3O
+is more shifted to the right, i.e. the species A
- on the right is more stable.
So when is A
- more stable? When its energy is lower.
Charged molecules 'like' to spread their charge over the largest possible number of atoms, to lower the overall energy.
That's why, for instance, phenols are much more acidic than cyclohexanols.
In your case, when one COOH group is deprotonated, the fraction of negative charge on the oxygen is lowered by delocalisation on the carbonyl group as usual, but also by hydrogen bonding with the OH group of the other, spatially close COOH group.
The dotted line you draw to indicate a hydrogen bond actually means that the charge is partially spread between the two atoms.
The other acid obviously can't do that.