Kinetics and mechanisms of the formation of YBa2Cu3O7−x