From this article,
Producers requested African actors for the battle scene filmed at Bouckaert Farms in Fairburn (Georgia). This are the same fields used in Black Panther, both films were shot at the same time. These sequences were completed in post-production adding an African landscape and the city of Wakanda to the background.
From this interview of Ryan Coogler,
“So what [Infinity War directors the Russo Brothers] would do is, they would send their production design team and their VFX team to come spend time with me and our production design and VFX team,” Black Panther co-writer and director Ryan Coogler told io9 this week. “And they would ask questions. Even with their writers [Christopher Markus and Stephen McFeely], as they were writing, they were thinking about, ‘What scene does this?’ ‘What kind of things in the Wakanda that you are building have these things?’ ‘Where would this kind of thing happen?’ So as we were really fleshing out Wakanda, we would tell them all about it so that their ideas could track.”
The same went for the actors who appear in both films. “[The Infinity War team] would spend time with our actors when they could, just so they could get ready to do what they need to do in their film,” Coogler said.