At 0K the fermi level E_{Fn} lies between the conduction band and the
donor level.
As temperature increases more and more electrons shift to the
conduction band leaving behind equal number of holes in the valence
band. These electron hole pairs are intrinsic carriers.
With the increase in temperature the intrinsic carriers dominate the
donors.
To maintain the balance of the carrier density on both sides the
fermi level $E_{Fn}$ gradually shifts downwards.
Finally at high temperature when the donor density is almost
negligible E_Fn is very close to$ E_{Fi}$.
IN p-TYPE SEMICONDUCTOR.
At 0K the fermi level $E_{Fp}$ in a p-type semiconductor lies between the
acceptor level and the valence band.
With the increase in temperature more and more holes are created in
the valence band as equal number of electrons move to the conduction
band.
As temperature increases the intrinsic holes dominate the acceptor
holes.
Hence the number of intrinsic carriers in the conduction band and in
the valence band become nearly equal at high temperature.
The fermi level $E_{Fp}$ gradually shifts upwards to maintain the balance
of carrier density above and below it.
At high temperature when the acceptor density become insignificant as
compared to the intrinsic density, $E_{Fp}$ is positioned very close to
the intrinsic fermi level $E_{Fi}$ but little below it.