The isostructural double perovskites Ba2CuTeO6 and Ba2CuWO6 are shown by theory and experiment to be frustrated square-lattice antiferromagnets with opposing dominant magnetic interactions. This is driven by differences in orbital hybridisation of Te6+ and W6+. A spin-liquid-like ground state is predicted for Ba2Cu(Te1-xWx)O6 solid solution similar to recent observations in Sr2Cu(Te1-xWx)O6.