SMA observations of the W3(OH) complex: Dynamical differentiation between W3(H2O) and W3(OH)