At $\mathrm{pH}=12,$ the rate of hydrolysis of ester $\mathbf{A}$ is greater than the rate of hydrolysis of ester $\mathbf{B}$. At $\mathrm{pH}=8$, the relative rates reverse (that is, ester $\mathbf{B}$ hydrolyzes faster than ester A). Explain these observations.