We clarify a relationship of the dynamics of a solar flare and a growing Coronal Mass Ejection (CME) by investigating the dynamics of magnetic fields during the X2.2-class flare taking place in the solar active region 11158 on 2011 February 15, based on simulation results obtained from Inoue et al. 2014. We found that the strongly twisted lines formed through the tether-cutting reconnection in the twisted lines of a nonlinear force-free field (NLFFF) can break the force balance within the magnetic field, resulting in their launch from the solar surface. We further discover that a large-scale flux tube is formed during the eruption as a result of the tether-cutting reconnection between the eruptive strongly twisted lines and these ambient weakly twisted lines. Then the newly formed large flux tube exceeds the critical height of the torus instability. The tether-cutting reconnection thus plays an important role in the triggering a CME. Furthermore, we found that the tangential fields at the solar surface illustrate different phases in the formation of the flux tube and its ascending phase over the threshold of the torus instability. We will discuss about these dynamics in detail.