"They have been learning Chinese for a long time."
The second 了 is redundant and borderline wrong. Please at least accept the sentence without the second 了
Actually, the second 了 is necessary to capture English, which indicates the action is ongoing ("have been learning"). Here is what I posted elsewhere to explain that sentence final 了 indicates the statement is currently relevant.
[C]ompare the following two sentences: (1) 我学汉语学了三年。and (2) 我学汉语学了三年了。Sentence (1) indicates that the speaker studied three years of Standard Chinese in the past but is not longer learning the language. Sentence (2) states the same period of study but indicates that the speaker is still currently learning the language. This change in meaning comes from sentence-final 了.
But this explanation seems to conflict with the explanation for 'I have been waiting' in this lesson, which said that the first 了 said the action was over, and the second one indicated the situation had changed. Neither seem true in this example, even though the English phrasing is the same.
What you have to understand about 了 is that it is a really devilish particle, which can indicate a whole range of meanings. Sometimes it is just there to stress a sentence, sometimes (in combination with 太) it reverts the meaning of the sentence. keyongming is right, his sentence no. 1 sounds a bit like a report in a CV, while the second one is more like Look! I have been studying Chinese for three years (already)! I am still unsure though whether or not the lesson should have the second 了