Rewrite this sentence using WHEN THE FIRE at the beginning. After having at last put out the fire, the villagers helped the victims clear the building of all the rubble. Thank you Ms. Sue

It could read:

When the fire was out, the villagers helped the victims clear the building of all the rubble.

When the fire was finally extinguished, the villagers assisted the victims in clearing the building of all the rubble. Thank you, Ms. Sue.