@dhriti,
When you do some work for yourself then ask for help people will give it, but if you just cut and paste your assignment with nothing else people won't do your work for you.
You have done some work so I'll help.
The second one is wrong. A block of flats is singular.
The entire block of flats is being demolished.
Whether or not you tag
by them at the end is up to you. It depends on what the purpose of the sentence is. If it's just to say that the flats are being demolished then you don't need it, if it's important to know who is demolishing the flats you do need it.
As your original sentence includes
them, I'd keep it and go for your first option.
The entire block of flats is being demolished by them.
Remember to put a full stop at the end of the sentence.