I'd do a week or so just to be on the safe side. It's not so much the calf going back to the "real" momma, it's the cow maybe thinking she would want the calf back. If you gave the twin to the cow that lost her calf, right soon after it was born, and she took it and is mothering it and it is nursing and all, it won't remember the original momma. And usually a cow doesn't really want twins or will often show some favouritism to one over the other but not always. So if the calf was very new and the cow took it well and is doing well with it, I wouldn't get too worried that they will get mixed up.
Had a cow have twins and another have a single calf the same day. They wound up raising the 3 calves as a joint effort, you'd see 2 on one cow then later 2 on the other cow. We turned them out to grass together, with other cows and calves, and you could see them "co-mothering" them. Both are bred back and will calve at just about 12 months so the twin birth didn't cause any problems. We usually have at least one set of twins on the beef cows a year, and sometimes I have pulled one and sometimes not depending on several things.