If the dissociation constants of two weak acids A & B are K1 & K2, then the relative strengths of A & B are given by
Strength of an acid is decided by the centration of H+ it furnishes.
H+ concentration furnished by weak acid is given as
.
Considering concentraitons to be same,
relative strength is given as