Translation:We thought a long time before asking this question.
If you are familiar with the formal English structure "that which", the Russian one is roughly the same.
- Мне не понравилось то, что я услышал. = I did not like that which I heard. (sounds quite stiff in today's English)
Перед is originally a preposition (a prototypal preposition, actually,—it has been a preposition for a really long time), and you would expect it to stand before a noun or something that acts like noun. Also, it requires the Instrumental—an infinitive of a verb cannot provide you that.
So you use то as a noun-like pronoun and как as a conjunction to introduce a clause that specifies the reference point of "before". Together, they form a compound conjunction «перед тем как».
До того как makes up for the lack of the Past Perfect tense in Russian. The phrase is used to introduce events that had happened before a particular event in the past, e.g. До того, как переехать в Чикаго, он жил в Нью-Йорке (Before he moved to Chicago, he had lived in New York city). Using "до того, как" is a must when the time gap between the two events is indicated: за час до того, как позвонить мне = an hour before calling me
Perfective verbs do not collocate with «долго». It would be correct to say, «Мы хорошо подумали перед тем, как задать вопрос» (literally, “We thought well before asking the question”), but “had been thinking” is Past Perfect Continuous (aka Past Perfect Progressive), which is used to emphasize the duration of a past action that started prior to another past action. Given that thinking was no longer in progress at the moment of asking the question, I would chose to use simple Past Continuous (“We we were thinking for a long time”) instead of the Past Perfect Continuous, but it is up to native speakers of English to decide which tense is more appropriate here.
Phrases like "pered tem, kak" (right before something), "do togo, kak" (generally some time before something) and "posle togo, kak" (after something) are set phrases to express time and as you see are used with verbs.
You can just use the preposition if using the noun. So for example...
"Do togo, kak nachat' etot protsess..."
Or "Do nachala etogo protsessa..."
can both work in many cases.
"Перед тем как + infintive" (=before + -ing-form) and "после того как + subject + verb in the past tense" (= after + -ing-form) are set expressions in Russian. The word "когда" does not occur in them as they themselves answer the "when" question. When it is followed by как, the neuter demonstrative pronoun то in any of its forms inluding the oblique case forms (того, тому, тем, о том) usually refers to a manner in which an action is performed or the result of an action, e.g. Мне нравится то, как он это делает. (= I like the way he does it.) Всё зависит от того, как он сдаст экзамен. (=All depends on his exam result.). However, in "перед тем как" and "после того как" "то как" refers to an event rather than the time or manner. "То, что" is the equivalent of "what". Cf. Мне нравится то, что он делает (=I like what he is doing / what he does.) Всё зависит от того, что он мне скажет. (=All depends on what he will tell me).
тем is a form of то (like этим is a form of это). You use it in перед тем как ("before"). Russian often uses these two-part structures reminiscent of the English "he who" or "that which" (e.g., Then the mistake disappears, while that which is true remains).
Consider "перед тем как" a compound conjunction. Why it exists? The main issue is, "to ask that question" is not a noun. You cannot directly put in into the Instrumental and attach перед.
What we do instead is make a как-clause attached to то, which can have cases and can take a preposition:
- Это было до того, как я ушёл. = It was before I left.
- Это было после того, как я ушёл. = I was after I left.
- Расскажи про то, как ты училась. = Tell me about how you studied.
- Судя по тому, как ты отвечал, ты плохо подготовился. = Judging by the way you were answering, you were poorly prepared.
- Позвони нам перед тем, как приезжать. = Give us a call before coming.
God, I hate the male audio voice. Always changing adding "tch" sounds to words, not saying consonants like they're written. The female voice is so much more clear and concise. I wish they'd get rid of it.
He sounds a little drunk, actually. Maybe that's the problem. He drinks before he records himself.