We present Submillimeter Array (SMA) observations of the HCN (3-2) and HCO + (3-2) molecular lines toward the W3(H 2 O) and W3(OH) star-forming complexes. Infall and outflow motions in the W3(H 2 O) have been characterized by observing HCN and HCO + transitions. High-velocity blue/red-shifted emission, tracing the outflow, show multiple knots, which might originate in episodic and precessing outflows. 'Blue-peaked' line profiles indicate that gas is infalling onto the W3(H 2 O) dust core. The measured large mass accretion rate, 2.3×10 −3 M ⊙ yr −1 , together with the small free-fall time scale, 5×10 3 yr, suggest W3(H 2 O) is in an early evolutionary stage of the process of formation of high-mass stars. For the W3(OH), a two-layer model fit to the HCN and HCO + spectral lines and Spizter/IRAC images support that the W3(OH) Hii region is expanding and interacting with the ambient gas, with the shocked neutral gas being expanding with an expansion timescale of 6.4×10 3 yr. The observations suggest different kinematical timescales and dynamical states for the W3(H 2 O) and W3(OH).