This article details a Q&A event in China with the Russo brothers.
Here's the relevant material. Quoted text is from the Russo brothers. Unquoted italicized text is by the author of gthe article:
So does that mean there are two Captain America’s in that alternate timeline?
“Yes, there were two Captain Americas in that reality. It’s just like what Hulk said, what happened in the past has already happened. If you go back to past, you simply created a new reality. The characters in this movie created a new timeline when they went back to the past, but it had no effect to the prime universe. What happened in the past 22 movies was still canon.”
That’s why Hulk promised The Ancient One that they’d return the Infinity Stones, so as not to mess up what she and the people in her reality considered their own prime timeline. Basically, this allows for multiple realities to exist in the Marvel Cinematic Universe, just as Marvel Comics has various realities that allow for different versions of characters to exists and eventually crossover and meet each other. The Russos explained it further by again referencing the final scene with Cap:
“Both Ancient One and Hulk were right. You can’t change the future by simply going back to past. But it’s possible to create a different alternate future. It’s not butterfly effect. Every decision you made in the past could potentially create a new timeline. For example, the old Cap at the end movie, he lived his married life in a different universe from the main one. He had to make another jump back to the main universe at the end to give the shield to Sam.”
So what did Steve Rogers have to do in order to time travel back to the primary timeline and give Sam Wilson his shield? That’s a question that we may get an answer to down the road. Because apparently there are still some details Anthony & Joe Russo aren’t willing to reveal. The directors were also asked when Steve Rogers traveled back to in order to dance with her, and they said:
“We can’t answer it for now, this is a story that happened in an alternate reality. Maybe it will be revealed in the future.”