The stability analysis is one of the important problems in the traffic flow theory, where the congestion phenomena can be regarded as the instability and the phase transition of a dynamical system. An extended optimal velocity model is deduced by considering the effect of the information of two leader cars. The stability condition of the extended model is obtained by using the linear stability theory. The modified Korteweg-de Vries (mKdV) equation is derived to describe the traffic behavior near the critical point by applying the nonlinear analysis. The numerical simulation results demonstrate the analytical results and show that the traffic congests are suppressed more efficiently by considering two vehicles ahead. Therefore, the next-nearest-neighbor car has strong effects on traffic dynamics and plays an important role on stabilizing the traffic flow.