The full sentence might read something like How long did he stay with you before you shipped him off to the folks' home? The sequence of events is as follows: he first came to your house and then, after spending some time with you, he left . It's obvious to me that "how long before" can refer only to the period of time between his arrival at your house/place and his leaving.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.