Interaction between two coupled Bose-Einstein condensates (BECs) is investigated by the variational approach in two finite traps, and the effects of the spacing between the two traps on dynamics of the two BECs are analyzed. The spacing determines the stable condition of stationary states, affects t