When you take a hit, THC is stored in your fat cells within minutes. It can remain there for up to 3 months, occasionally being excreted by the fat cells and therefore showing up in your urine.
There are too many factors for a single definite Answer to this question. Age, fitness level, hydration, nutrition, and even the strength of the marijuana smoked can play a role, but not in every case.
I have watched students be urine-drug-screened for many years. Some tested positive even though they hadn't smoked in months; some tested negative when they had smoked the previous week.
Does overdosing on water, vinegar, lemon juice, cranberry juice, or detox kits work? Not always. Does using someone else's urine work? Never. Theoretically, you can use someone else's urine, but it would involve keeping it in your mouth or putting it into your bladder using a catheter. Not a pleasant scenario.
I know this isn't the Answer you wanted, but it's based on 20+ years of experience.
If you pass this urine test, please consider not smoking at all. It's the only proven way to pass a drug test.
Healthcare teaching assistant.