Effect of heterovalent substitution of rare-earth elements on the magnetic and transport properties of YBa2Cu3O7