are used in different contexts. The former can give an unbiased s_p^2 to estimate \sigma^2 when the two groups share an equal population variance. The latter one can give a more efficient s_p^2 to estimate \sigma^2, although subject to bias. Note that the quantities s_i^2 in the right hand sides of both equations are the unbiased estimates.
