The sentence rewritten in the future perfect continuous tense would be:
"They will have been waiting for two hours by then."
The sentence rewritten in the future perfect continuous tense would be:
"They will have been waiting for two hours by then."