Consider an electron with spin magnetic moment u_s in a strong magnetic field B_z in the z direction. The potential for an electron with spin magnetic moment u_s in a magnetic field B is V=-u_s . B
where u_s = -((g_s)(u_B))/(hbar) . S
Thus the Hamiltonian is H_0 = ((g_S)(u_B))/(hbar) . B . S = ((g_s)/2)(u_B) . B . sigma
and g_s = 2 for the electron. The eigenstates of H_0 are just the spin up and spin down states, | up > and | down >, with energies E_+ = (u_B)(B_z) and E_- = -(u_B)(B_z).
Suppose we are in the spin up state, | up >, and we add the small magnetic field (B_x)(x hat) with B_x << B_z. Take B = (B_x)(x hat) + (B_z)(z hat), and calculate the exact energies.