  Accurate calculations of the fine and hyperfine splitting of the 2P state in
Li and Be$^+$ isotopes using the explicitly correlated Hylleraas basis set are
presented. Theoretical predictions including the mixing of $P_{1/2}$ and
$P_{3/2}$ states, relativistic and quantum electrodynamics effects on hyperfine
interactions, are compared with experimental values. It is concluded that
precise spectroscopic determination of the nuclear magnetic moments requires
elimination of nuclear structure effects by combining measurements for two
different states.
