When alkali metals are heated in a flame, they emit characteristic colors. Potassium (\( K \)) produces a violet flame, while lithium (\( Li \)) produces a crimson red flame. Thus, \[ A \] corresponds to lithium and \[ B \] corresponds to potassium.
Thus, the correct answer is \( \boxed{2} \).