"And although they were, before it was sent down upon them" - the rain - "before it, in despair," meaning: despondent and helpless.
His saying: "before it was sent down upon them before it" is a construction of the Arabs which is redundant, like His saying: "And they, regarding the Hereafter, are disbelievers."
Muhammad said: The repetition of "before" is for the sake of emphasis.