Theory of oxygen diffusion in the YBa2Cu3O7-x superconducting compound