We get sharp estimates for the distribution function of nonnegative weights that satisfy the so-called $A_{p_1,
p_2}$ condition. For particular choices of parameters $p_1$, $p_2$ this condition becomes an $A_p$-condition or
reverse Hölder condition. We also get maximizers for these sharp estimates. We use the Bellman technique and
try to carefully present and motivate our tactics. As an illustration of how these results can be used, we
deduce the following result: if a weight $w$ is in $A_2$ then it self-improves to a weight that satisfies a
reverse Hölder condition.